initial commit

This commit is contained in:
air66
2019-07-24 18:16:32 +01:00
commit 5efebf4ded
8591 changed files with 899103 additions and 0 deletions

19
node_modules/es5-ext/promise/#/as-callback.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
"use strict";
var ensurePlainFunction = require("../../object/ensure-plain-function")
, ensureThenable = require("../../object/ensure-thenable")
, microtaskDelay = require("../../function/#/microtask-delay");
module.exports = function (callback) {
ensureThenable(this);
ensurePlainFunction(callback);
// Rely on microtaskDelay to escape eventual error swallowing
this.then(
microtaskDelay.call(function (value) {
callback(null, value);
}),
microtaskDelay.call(function (reason) {
callback(reason);
})
);
};

10
node_modules/es5-ext/promise/#/finally/implement.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
"use strict";
if (!require("./is-implemented")()) {
Object.defineProperty(Promise.prototype, "finally", {
value: require("./shim"),
configurable: true,
enumerable: false,
writable: true
});
}

3
node_modules/es5-ext/promise/#/finally/index.js generated vendored Normal file
View File

@@ -0,0 +1,3 @@
"use strict";
module.exports = require("./is-implemented")() ? Promise.prototype.finally : require("./shim");

View File

@@ -0,0 +1,7 @@
"use strict";
module.exports = function () {
if (typeof Promise !== "function") return false;
if (typeof Promise.prototype.finally !== "function") return false;
return true;
};

24
node_modules/es5-ext/promise/#/finally/shim.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
"use strict";
var ensurePlainFunction = require("../../../object/ensure-plain-function")
, isThenable = require("../../../object/is-thenable")
, ensureThenable = require("../../../object/ensure-thenable");
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; });
}
);
};

3
node_modules/es5-ext/promise/#/index.js generated vendored Normal file
View File

@@ -0,0 +1,3 @@
"use strict";
module.exports = { asCallback: require("./as-callback"), finally: require("./finally") };