From abd94a7f5a50f43c797a11b53549ae48fff667c3 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 10 Oct 2016 03:43:44 +0200 Subject: add node_modules to address #4364 --- node_modules/async/internal/applyEach.js | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 node_modules/async/internal/applyEach.js (limited to 'node_modules/async/internal/applyEach.js') diff --git a/node_modules/async/internal/applyEach.js b/node_modules/async/internal/applyEach.js new file mode 100644 index 000000000..4035bfb3d --- /dev/null +++ b/node_modules/async/internal/applyEach.js @@ -0,0 +1,33 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = applyEach; + +var _rest = require('lodash/rest'); + +var _rest2 = _interopRequireDefault(_rest); + +var _initialParams = require('./initialParams'); + +var _initialParams2 = _interopRequireDefault(_initialParams); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function applyEach(eachfn) { + return (0, _rest2.default)(function (fns, args) { + var go = (0, _initialParams2.default)(function (args, callback) { + var that = this; + return eachfn(fns, function (fn, cb) { + fn.apply(that, args.concat([cb])); + }, callback); + }); + if (args.length) { + return go.apply(this, args); + } else { + return go; + } + }); +} +module.exports = exports['default']; \ No newline at end of file -- cgit v1.2.3