Update to v13 and add queue and completely change code

This commit is contained in:
a 2021-12-06 16:34:00 +01:00
parent dcef23d0ed
commit 55a38726a3
6706 changed files with 424137 additions and 61608 deletions

24
node_modules/ext/thenable_/finally.js generated vendored Normal file
View file

@ -0,0 +1,24 @@
"use strict";
var ensurePlainFunction = require("type/plain-function/ensure")
, isThenable = require("type/thenable/is")
, ensureThenable = require("type/thenable/ensure");
var resolveCallback = function (callback, next) {
var callbackResult = callback();
if (!isThenable(callbackResult)) return next();
return callbackResult.then(next);
};
module.exports = function (callback) {
ensureThenable(this);
ensurePlainFunction(callback);
return this.then(
function (result) {
return resolveCallback(callback, function () { return result; });
},
function (error) {
return resolveCallback(callback, function () { throw error; });
}
);
};