node_modules

This commit is contained in:
saeid
2019-07-15 13:07:31 +04:30
parent d3735c6d30
commit ce1a3ebf9c
35713 changed files with 3639219 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
'use strict';
// TODO: Use rest/spread when targeting Node.js 6
module.exports = function (input) {
const args = Array.isArray(input) ? input : arguments;
if (args.length === 0) {
return Promise.reject(new Error('Expected at least one argument'));
}
return [].slice.call(args, 1).reduce((a, b) => {
return function () {
return Promise.resolve(a.apply(null, arguments)).then(b);
};
}, args[0]);
};