remove node_modules and .gitignore them

This commit is contained in:
2023-11-24 14:40:32 -05:00
parent 5f6e638903
commit a74d7b91b8
8963 changed files with 1 additions and 874175 deletions
-24
View File
@@ -1,24 +0,0 @@
"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; });
}
);
};