summaryrefslogtreecommitdiff
path: root/node_modules/async/internal/applyEach.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/async/internal/applyEach.js')
-rw-r--r--node_modules/async/internal/applyEach.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/node_modules/async/internal/applyEach.js b/node_modules/async/internal/applyEach.js
new file mode 100644
index 0000000..a3f4ef1
--- /dev/null
+++ b/node_modules/async/internal/applyEach.js
@@ -0,0 +1,29 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+exports.default = function (eachfn) {
+ return function applyEach(fns, ...callArgs) {
+ const go = (0, _awaitify2.default)(function (callback) {
+ var that = this;
+ return eachfn(fns, (fn, cb) => {
+ (0, _wrapAsync2.default)(fn).apply(that, callArgs.concat(cb));
+ }, callback);
+ });
+ return go;
+ };
+};
+
+var _wrapAsync = require('./wrapAsync.js');
+
+var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
+
+var _awaitify = require('./awaitify.js');
+
+var _awaitify2 = _interopRequireDefault(_awaitify);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+module.exports = exports['default']; \ No newline at end of file