diff options
author | Alexander Early <alexander.early@gmail.com> | 2016-05-05 16:29:28 -0700 |
---|---|---|
committer | Alexander Early <alexander.early@gmail.com> | 2016-05-05 16:29:28 -0700 |
commit | a684c1b75645068559516d2fd295e0da342e6b51 (patch) | |
tree | 3b667036a55aa6667ad39c2d78a3bfd86e50ec18 | |
parent | 3ed8168c69c9e63e2ec7ded53abcfd760ca8812d (diff) | |
download | async-a684c1b75645068559516d2fd295e0da342e6b51.tar.gz |
update minified build
-rw-r--r-- | bower.json | 1 | ||||
-rw-r--r-- | dist/async.js | 2314 | ||||
-rw-r--r-- | dist/async.min.js | 4 | ||||
-rw-r--r-- | dist/async.min.map | 2 | ||||
-rw-r--r-- | package.json | 2 |
5 files changed, 2262 insertions, 61 deletions
@@ -27,6 +27,7 @@ "es6-promise": "^2.3.0", "fs-extra": "^0.26.7", "jscs": "^1.13.1", + "jscs-jsdoc": "^1.3.2", "jshint": "~2.8.0", "karma": "^0.13.2", "karma-browserify": "^4.2.1", diff --git a/dist/async.js b/dist/async.js index 2062bea..02b0295 100644 --- a/dist/async.js +++ b/dist/async.js @@ -362,8 +362,9 @@ function once(fn) { return function () { if (fn === null) return; - fn.apply(this, arguments); + var callFn = fn; fn = null; + callFn.apply(this, arguments); }; } @@ -801,8 +802,9 @@ function onlyOnce(fn) { return function () { if (fn === null) throw new Error("Callback was already called."); - fn.apply(this, arguments); + var callFn = fn; fn = null; + callFn.apply(this, arguments); }; } @@ -867,6 +869,24 @@ }); } + /** + * The same as `map` but runs a maximum of `limit` async operations at a time. + * + * @name mapLimit + * @static + * @memberOf async + * @see async.map + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} iteratee - A function to apply to each item in `coll`. + * The iteratee is passed a `callback(err, transformed)` which must be called + * once it has completed with an error (which can be `null`) and a transformed + * item. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Results is an array of the + * transformed items from the `coll`. Invoked with (err, results). + */ var mapLimit = doParallelLimit(_asyncMap); function doLimit(fn, limit) { @@ -875,20 +895,213 @@ }; } + /** + * Produces a new collection of values by mapping each value in `coll` through + * the `iteratee` function. The `iteratee` is called with an item from `coll` + * and a callback for when it has finished processing. Each of these callback + * takes 2 arguments: an `error`, and the transformed item from `coll`. If + * `iteratee` passes an error to its callback, the main `callback` (for the + * `map` function) is immediately called with the error. + * + * Note, that since this function applies the `iteratee` to each item in + * parallel, there is no guarantee that the `iteratee` functions will complete + * in order. However, the results array will be in the same order as the + * original `coll`. + * + * @name map + * @static + * @memberOf async + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A function to apply to each item in `coll`. + * The iteratee is passed a `callback(err, transformed)` which must be called + * once it has completed with an error (which can be `null`) and a + * transformed item. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Results is an array of the + * transformed items from the `coll`. Invoked with (err, results). + * @example + * + * async.map(['file1','file2','file3'], fs.stat, function(err, results) { + * // results is now an array of stats for each file + * }); + */ var map = doLimit(mapLimit, Infinity); + /** + * Applies the provided arguments to each function in the array, calling + * `callback` after all functions have completed. If you only provide the first + * argument, then it will return a function which lets you pass in the + * arguments as if it were a single function call. + * + * @name applyEach + * @static + * @memberOf async + * @category Control Flow + * @param {Array|Object} fns - A collection of asynchronous functions to all + * call with the same arguments + * @param {...*} [args] - any number of separate arguments to pass to the + * function. + * @param {Function} [callback] - the final argument should be the callback, + * called when all functions have completed processing. + * @returns {Function} - If only the first argument is provided, it will return + * a function which lets you pass in the arguments as if it were a single + * function call. + * @example + * + * async.applyEach([enableSearch, updateSchema], 'bucket', callback); + * + * // partial application example: + * async.each( + * buckets, + * async.applyEach([enableSearch, updateSchema]), + * callback + * ); + */ var applyEach = applyEach$1(map); + /** + * The same as `map` but runs only a single async operation at a time. + * + * @name mapSeries + * @static + * @memberOf async + * @see async.map + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A function to apply to each item in `coll`. + * The iteratee is passed a `callback(err, transformed)` which must be called + * once it has completed with an error (which can be `null`) and a + * transformed item. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Results is an array of the + * transformed items from the `coll`. Invoked with (err, results). + */ var mapSeries = doLimit(mapLimit, 1); + /** + * The same as `applyEach` but runs only a single async operation at a time. + * + * @name applyEachSeries + * @static + * @memberOf async + * @see async.applyEach + * @category Control Flow + * @param {Array|Object} fns - A collection of asynchronous functions to all + * call with the same arguments + * @param {...*} [args] - any number of separate arguments to pass to the + * function. + * @param {Function} [callback] - the final argument should be the callback, + * called when all functions have completed processing. + * @returns {Function} - If only the first argument is provided, it will return + * a function which lets you pass in the arguments as if it were a single + * function call. + */ var applyEachSeries = applyEach$1(mapSeries); + /** + * Creates a continuation function with some arguments already applied. + * + * Useful as a shorthand when combined with other control flow functions. Any + * arguments passed to the returned function are added to the arguments + * originally passed to apply. + * + * @name apply + * @static + * @memberOf async + * @category Util + * @param {Function} function - The function you want to eventually apply all + * arguments to. Invokes with (arguments...). + * @param {...*} arguments... - Any number of arguments to automatically apply + * when the continuation is called. + * @example + * + * // using apply + * async.parallel([ + * async.apply(fs.writeFile, 'testfile1', 'test1'), + * async.apply(fs.writeFile, 'testfile2', 'test2') + * ]); + * + * + * // the same process without using apply + * async.parallel([ + * function(callback) { + * fs.writeFile('testfile1', 'test1', callback); + * }, + * function(callback) { + * fs.writeFile('testfile2', 'test2', callback); + * } + * ]); + * + * // It's possible to pass any number of additional arguments when calling the + * // continuation: + * + * node> var fn = async.apply(sys.puts, 'one'); + * node> fn('two', 'three'); + * one + * two + * three + */ var apply$1 = rest(function (fn, args) { return rest(function (callArgs) { return fn.apply(null, args.concat(callArgs)); }); }); + /** + * Take a sync function and make it async, passing its return value to a + * callback. This is useful for plugging sync functions into a waterfall, + * series, or other async functions. Any arguments passed to the generated + * function will be passed to the wrapped function (except for the final + * callback argument). Errors thrown will be passed to the callback. + * + * If the function passed to `asyncify` returns a Promise, that promises's + * resolved/rejected state will be used to call the callback, rather than simply + * the synchronous return value. + * + * This also means you can asyncify ES2016 `async` functions. + * + * @name asyncify + * @static + * @memberOf async + * @alias wrapSync + * @category Util + * @param {Function} func - The synchronous function to convert to an + * asynchronous function. + * @returns {Function} An asynchronous wrapper of the `func`. To be invoked with + * (callback). + * @example + * + * // passing a regular synchronous function + * async.waterfall([ + * async.apply(fs.readFile, filename, "utf8"), + * async.asyncify(JSON.parse), + * function (data, next) { + * // data is the result of parsing the text. + * // If there was a parsing error, it would have been caught. + * } + * ], callback); + * + * // passing a function returning a promise + * async.waterfall([ + * async.apply(fs.readFile, filename, "utf8"), + * async.asyncify(function (contents) { + * return db.model.create(contents); + * }), + * function (model, next) { + * // `model` is the instantiated model object. + * // If there was an error, this function would be skipped. + * } + * ], callback); + * + * // es6 example + * var q = async.queue(async.asyncify(async function(file) { + * var intermediateStep = await processFile(file); + * return await somePromise(intermediateStep) + * })); + * + * q.push(files); + */ function asyncify(func) { return initialParams(function (args, callback) { var result; @@ -2766,6 +2979,83 @@ return -1; } + /** + * Determines the best order for running the functions in `tasks`, based on + * their requirements. Each function can optionally depend on other functions + * being completed first, and each function is run as soon as its requirements + * are satisfied. + * + * If any of the functions pass an error to their callback, the `auto` sequence + * will stop. Further tasks will not execute (so any other functions depending + * on it will not run), and the main `callback` is immediately called with the + * error. + * + * Functions also receive an object containing the results of functions which + * have completed so far as the first argument, if they have dependencies. If a + * task function has no dependencies, it will only be passed a callback. + * + * @name auto + * @static + * @memberOf async + * @category Control Flow + * @param {Object} tasks - An object. Each of its properties is either a + * function or an array of requirements, with the function itself the last item + * in the array. The object's key of a property serves as the name of the task + * defined by that property, i.e. can be used when specifying requirements for + * other tasks. The function receives one or two arguments: + * * a `results` object, containing the results of the previously executed + * functions, only passed if the task has any dependencies, + * * a `callback(err, result)` function, which must be called when finished, + * passing an `error` (which can be `null`) and the result of the function's + * execution. + * @param {number} [concurrency=Infinity] - An optional `integer` for + * determining the maximum number of tasks that can be run in parallel. By + * default, as many as possible. + * @param {Function} [callback] - An optional callback which is called when all + * the tasks have been completed. It receives the `err` argument if any `tasks` + * pass an error to their callback. Results are always returned; however, if an + * error occurs, no further `tasks` will be performed, and the results object + * will only contain partial results. Invoked with (err, results). + * @example + * + * async.auto({ + * // this function will just be passed a callback + * readData: async.apply(fs.readFile, 'data.txt', 'utf-8'), + * showData: ['readData', function(results, cb) { + * // results.readData is the file's contents + * // ... + * }] + * }, callback); + * + * async.auto({ + * get_data: function(callback) { + * console.log('in get_data'); + * // async code to get some data + * callback(null, 'data', 'converted to array'); + * }, + * make_folder: function(callback) { + * console.log('in make_folder'); + * // async code to create a directory to store a file in + * // this is run at the same time as getting the data + * callback(null, 'folder'); + * }, + * write_file: ['get_data', 'make_folder', function(results, callback) { + * console.log('in write_file', JSON.stringify(results)); + * // once there is some data and the directory exists, + * // write the data to a file in the directory + * callback(null, 'filename'); + * }], + * email_link: ['write_file', function(results, callback) { + * console.log('in email_link', JSON.stringify(results)); + * // once the file is written let's email a link to it... + * // results.write_file contains the filename returned by write_file. + * callback(null, {'file':results.write_file, 'email':'user@example.com'}); + * }] + * }, function(err, results) { + * console.log('err = ', err); + * console.log('results = ', results); + * }); + */ function auto (tasks, concurrency, callback) { if (typeof concurrency === 'function') { // concurrency is optional, shift the args. @@ -2790,32 +3080,31 @@ var readyTasks = []; + // for cycle detection: + var readyToCheck = []; // tasks that have been identified as reachable + // without the possibility of returning to an ancestor task + var uncheckedDependencies = {}; + forOwn(tasks, function (task, key) { if (!isArray(task)) { // no dependencies enqueueTask(key, [task]); + readyToCheck.push(key); return; } var dependencies = task.slice(0, task.length - 1); var remainingDependencies = dependencies.length; - - checkForDeadlocks(); - - function checkForDeadlocks() { - var len = dependencies.length; - var dep; - while (len--) { - if (!(dep = tasks[dependencies[len]])) { - throw new Error('async.auto task `' + key + '` has non-existent dependency in ' + dependencies.join(', ')); - } - if (isArray(dep) && baseIndexOf(dep, key, 0) >= 0) { - throw new Error('async.auto task `' + key + '`Has cyclic dependencies'); - } - } + if (!remainingDependencies) { + enqueueTask(key, [task]); + readyToCheck.push(key); } + uncheckedDependencies[key] = remainingDependencies; arrayEach(dependencies, function (dependencyName) { + if (!tasks[dependencyName]) { + throw new Error('async.auto task `' + key + '` has a non-existent dependency in ' + dependencies.join(', ')); + } addListener(dependencyName, function () { remainingDependencies--; if (remainingDependencies === 0) { @@ -2825,6 +3114,7 @@ }); }); + checkForDeadlocks(); processQueue(); function enqueueTask(key, task) { @@ -2892,6 +3182,37 @@ taskFn(taskCallback); } } + + function checkForDeadlocks() { + // Kahn's algorithm + // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm + // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html + var currentTask; + var counter = 0; + while (readyToCheck.length) { + currentTask = readyToCheck.pop(); + counter++; + arrayEach(getDependents(currentTask), function (dependent) { + if (! --uncheckedDependencies[dependent]) { + readyToCheck.push(dependent); + } + }); + } + + if (counter !== numTasks) { + throw new Error('async.auto cannot execute tasks due to a recursive dependency'); + } + } + + function getDependents(taskName) { + var result = []; + forOwn(tasks, function (task, key) { + if (isArray(task) && baseIndexOf(task, taskName, 0) >= 0) { + result.push(key); + } + }); + return result; + } } /** @@ -2919,6 +3240,92 @@ return func.toString().match(argsRegex)[1].split(/\s*\,\s*/); } + /** + * A dependency-injected version of the {@link async.auto} function. Dependent + * tasks are specified as parameters to the function, after the usual callback + * parameter, with the parameter names matching the names of the tasks it + * depends on. This can provide even more readable task graphs which can be + * easier to maintain. + * + * If a final callback is specified, the task results are similarly injected, + * specified as named parameters after the initial error parameter. + * + * The autoInject function is purely syntactic sugar and its semantics are + * otherwise equivalent to {@link async.auto}. + * + * @name autoInject + * @static + * @memberOf async + * @see async.auto + * @category Control Flow + * @param {Object} tasks - An object, each of whose properties is a function of + * the form 'func([dependencies...], callback). The object's key of a property + * serves as the name of the task defined by that property, i.e. can be used + * when specifying requirements for other tasks. + * * The `callback` parameter is a `callback(err, result)` which must be called + * when finished, passing an `error` (which can be `null`) and the result of + * the function's execution. The remaining parameters name other tasks on + * which the task is dependent, and the results from those tasks are the + * arguments of those parameters. + * @param {Function} [callback] - An optional callback which is called when all + * the tasks have been completed. It receives the `err` argument if any `tasks` + * pass an error to their callback. The remaining parameters are task names + * whose results you are interested in. This callback will only be called when + * all tasks have finished or an error has occurred, and so do not specify + * dependencies in the same way as `tasks` do. If an error occurs, no further + * `tasks` will be performed, and `results` will only be valid for those tasks + * which managed to complete. Invoked with (err, [results...]). + * @example + * + * // The example from `auto` can be rewritten as follows: + * async.autoInject({ + * get_data: function(callback) { + * // async code to get some data + * callback(null, 'data', 'converted to array'); + * }, + * make_folder: function(callback) { + * // async code to create a directory to store a file in + * // this is run at the same time as getting the data + * callback(null, 'folder'); + * }, + * write_file: function(get_data, make_folder, callback) { + * // once there is some data and the directory exists, + * // write the data to a file in the directory + * callback(null, 'filename'); + * }, + * email_link: function(write_file, callback) { + * // once the file is written let's email a link to it... + * // write_file contains the filename returned by write_file. + * callback(null, {'file':write_file, 'email':'user@example.com'}); + * } + * }, function(err, email_link) { + * console.log('err = ', err); + * console.log('email_link = ', email_link); + * }); + * + * // If you are using a JS minifier that mangles parameter names, `autoInject` + * // will not work with plain functions, since the parameter names will be + * // collapsed to a single letter identifier. To work around this, you can + * // explicitly specify the names of the parameters your task function needs + * // in an array, similar to Angular.js dependency injection. The final + * // results callback can be provided as an array in the same way. + * + * // This still has an advantage over plain `auto`, since the results a task + * // depends on are still spread into arguments. + * async.autoInject({ + * //... + * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) { + * callback(null, 'filename'); + * }], + * email_link: ['write_file', function(write_file, callback) { + * callback(null, {'file':write_file, 'email':'user@example.com'}); + * }] + * //... + * }, ['email_link', function(err, email_link) { + * console.log('err = ', err); + * console.log('email_link = ', email_link); + * }]); + */ function autoInject(tasks, callback) { var newTasks = {}; @@ -2951,23 +3358,7 @@ } }); - auto(newTasks, function (err, results) { - var params; - if (isArray(callback)) { - params = copyArray(callback); - callback = params.pop(); - } else { - params = parseParams(callback); - params.shift(); - } - - params = arrayMap(params, function (name) { - return results[name]; - }); - - params.unshift(err); - callback.apply(null, params); - }); + auto(newTasks, callback); } var _setImmediate = typeof setImmediate === 'function' && setImmediate; @@ -3126,16 +3517,169 @@ return q; } + /** + * A cargo of tasks for the worker function to complete. Cargo inherits all of + * the same methods and event callbacks as {@link async.queue}. + * @typedef {Object} cargo + * @property {Function} length - A function returning the number of items + * waiting to be processed. Invoke with (). + * @property {number} payload - An `integer` for determining how many tasks + * should be process per round. This property can be changed after a `cargo` is + * created to alter the payload on-the-fly. + * @property {Function} push - Adds `task` to the `queue`. The callback is + * called once the `worker` has finished processing the task. Instead of a + * single task, an array of `tasks` can be submitted. The respective callback is + * used for every task in the list. Invoke with (task, [callback]). + * @property {Function} saturated - A callback that is called when the + * `queue.length()` hits the concurrency and further tasks will be queued. + * @property {Function} empty - A callback that is called when the last item + * from the `queue` is given to a `worker`. + * @property {Function} drain - A callback that is called when the last item + * from the `queue` has returned from the `worker`. + * @property {Function} idle - a function returning false if there are items + * waiting or being processed, or true if not. Invoke with (). + * @property {Function} pause - a function that pauses the processing of tasks + * until `resume()` is called. Invoke with (). + * @property {Function} resume - a function that resumes the processing of + * queued tasks when the queue is paused. Invoke with (). + * @property {Function} kill - a function that removes the `drain` callback and + * empties remaining tasks from the queue forcing it to go idle. Invoke with (). + */ + + /** + * Creates a `cargo` object with the specified payload. Tasks added to the + * cargo will be processed altogether (up to the `payload` limit). If the + * `worker` is in progress, the task is queued until it becomes available. Once + * the `worker` has completed some tasks, each callback of those tasks is + * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) + * for how `cargo` and `queue` work. + * + * While [queue](#queue) passes only one task to one of a group of workers + * at a time, cargo passes an array of tasks to a single worker, repeating + * when the worker is finished. + * + * @name cargo + * @static + * @memberOf async + * @see async.queue + * @category Control Flow + * @param {Function} worker - An asynchronous function for processing an array + * of queued tasks, which must call its `callback(err)` argument when finished, + * with an optional `err` argument. Invoked with (tasks, callback). + * @param {number} [payload=Infinity] - An optional `integer` for determining + * how many tasks should be processed per round; if omitted, the default is + * unlimited. + * @returns {cargo} A cargo object to manage the tasks. Callbacks can + * attached as certain properties to listen for specific events during the + * lifecycle of the cargo and inner queue. + * @example + * + * // create a cargo object with payload 2 + * var cargo = async.cargo(function(tasks, callback) { + * for (var i=0; i<tasks.length; i++) { + * console.log('hello ' + tasks[i].name); + * } + * callback(); + * }, 2); + * + * // add some items + * cargo.push({name: 'foo'}, function(err) { + * console.log('finished processing foo'); + * }); + * cargo.push({name: 'bar'}, function(err) { + * console.log('finished processing bar'); + * }); + * cargo.push({name: 'baz'}, function(err) { + * console.log('finished processing baz'); + * }); + */ function cargo(worker, payload) { - return queue(worker, 1, payload); + return queue(worker, 1, payload); } + /** + * The same as `eachOf` but runs a maximum of `limit` async operations at a + * time. + * + * @name eachOfLimit + * @static + * @memberOf async + * @see async.eachOf + * @alias forEachOfLimit + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} iteratee - A function to apply to each + * item in `coll`. The `key` is the item's key, or index in the case of an + * array. The iteratee is passed a `callback(err)` which must be called once it + * has completed. If no error has occurred, the callback should be run without + * arguments or with an explicit `null` argument. Invoked with + * (item, key, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ function eachOfLimit(obj, limit, iteratee, cb) { - _eachOfLimit(limit)(obj, iteratee, cb); + _eachOfLimit(limit)(obj, iteratee, cb); } + /** + * The same as `eachOf` but runs only a single async operation at a time. + * + * @name eachOfSeries + * @static + * @memberOf async + * @see async.eachOf + * @alias forEachOfSeries + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A function to apply to each item in `coll`. The + * `key` is the item's key, or index in the case of an array. The iteratee is + * passed a `callback(err)` which must be called once it has completed. If no + * error has occurred, the callback should be run without arguments or with an + * explicit `null` argument. Invoked with (item, key, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Invoked with (err). + */ var eachOfSeries = doLimit(eachOfLimit, 1); + /** + * Reduces `coll` into a single value using an async `iteratee` to return each + * successive step. `memo` is the initial state of the reduction. This function + * only operates in series. + * + * For performance reasons, it may make sense to split a call to this function + * into a parallel map, and then use the normal `Array.prototype.reduce` on the + * results. This function is for situations where each step in the reduction + * needs to be async; if you can get the data before reducing it, then it's + * probably a good idea to do so. + * + * @name reduce + * @static + * @memberOf async + * @alias inject, foldl + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {*} memo - The initial state of the reduction. + * @param {Function} iteratee - A function applied to each item in the + * array to produce the next step in the reduction. The `iteratee` is passed a + * `callback(err, reduction)` which accepts an optional error as its first + * argument, and the state of the reduction as the second. If an error is + * passed to the callback, the reduction is stopped and the main `callback` is + * immediately called with the error. Invoked with (memo, item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result is the reduced value. Invoked with + * (err, result). + * @example + * + * async.reduce([1,2,3], 0, function(memo, item, callback) { + * // pointless async: + * process.nextTick(function() { + * callback(null, memo + item) + * }); + * }, function(err, result) { + * // result is now equal to the last value of memo, which is 6 + * }); + */ function reduce(arr, memo, iteratee, cb) { eachOfSeries(arr, function (x, i, cb) { iteratee(memo, x, function (err, v) { @@ -3147,6 +3691,42 @@ }); } + /** + * Version of the compose function that is more natural to read. Each function + * consumes the return value of the previous function. It is the equivalent of + * {@link async.compose} with the arguments reversed. + * + * Each function is executed with the `this` binding of the composed function. + * + * @name seq + * @static + * @memberOf async + * @see async.compose + * @category Control Flow + * @param {...Function} functions - the asynchronous functions to compose + * @example + * + * // Requires lodash (or underscore), express3 and dresende's orm2. + * // Part of an app, that fetches cats of the logged user. + * // This example uses `seq` function to avoid overnesting and error + * // handling clutter. + * app.get('/cats', function(request, response) { + * var User = request.models.User; + * async.seq( + * _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data)) + * function(user, fn) { + * user.getCats(fn); // 'getCats' has signature (callback(err, data)) + * } + * )(req.session.user_id, function (err, cats) { + * if (err) { + * console.error(err); + * response.json({ status: 'error', message: err.message }); + * } else { + * response.json({ status: 'ok', message: 'Cats found', data: cats }); + * } + * }); + * }); + */ function seq() /* functions... */{ var fns = arguments; return rest(function (args) { @@ -3171,8 +3751,40 @@ var reverse = Array.prototype.reverse; + /** + * Creates a function which is a composition of the passed asynchronous + * functions. Each function consumes the return value of the function that + * follows. Composing functions `f()`, `g()`, and `h()` would produce the result + * of `f(g(h()))`, only this version uses callbacks to obtain the return values. + * + * Each function is executed with the `this` binding of the composed function. + * + * @name compose + * @static + * @memberOf async + * @category Control Flow + * @param {...Function} functions - the asynchronous functions to compose + * @example + * + * function add1(n, callback) { + * setTimeout(function () { + * callback(null, n + 1); + * }, 10); + * } + * + * function mul3(n, callback) { + * setTimeout(function () { + * callback(null, n * 3); + * }, 10); + * } + * + * var add1mul3 = async.compose(mul3, add1); + * add1mul3(4, function (err, result) { + * // result now equals 15 + * }); + */ function compose() /* functions... */{ - return seq.apply(null, reverse.call(arguments)); + return seq.apply(null, reverse.call(arguments)); } function concat$1(eachfn, arr, fn, callback) { @@ -3187,6 +3799,45 @@ }); } + /** + * Like `each`, except that it passes the key (or index) as the second argument + * to the iteratee. + * + * @name eachOf + * @static + * @memberOf async + * @alias forEachOf + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A function to apply to each + * item in `coll`. The `key` is the item's key, or index in the case of an + * array. The iteratee is passed a `callback(err)` which must be called once it + * has completed. If no error has occurred, the callback should be run without + * arguments or with an explicit `null` argument. Invoked with + * (item, key, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + * @example + * + * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; + * var configs = {}; + * + * async.forEachOf(obj, function (value, key, callback) { + * fs.readFile(__dirname + value, "utf8", function (err, data) { + * if (err) return callback(err); + * try { + * configs[key] = JSON.parse(data); + * } catch (e) { + * return callback(e); + * } + * callback(); + * }); + * }, function (err) { + * if (err) console.error(err.message); + * // configs is now a map of JSON data + * doSomethingWith(configs); + * }); + */ var eachOf = doLimit(eachOfLimit, Infinity); function doParallel(fn) { @@ -3195,6 +3846,32 @@ }; } + /** + * Applies `iteratee` to each item in `coll`, concatenating the results. Returns + * the concatenated list. The `iteratee`s are called in parallel, and the + * results are concatenated as they return. There is no guarantee that the + * results array will be returned in the original order of `coll` passed to the + * `iteratee` function. + * + * @name concat + * @static + * @memberOf async + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A function to apply to each item in `coll`. + * The iteratee is passed a `callback(err, results)` which must be called once + * it has completed with an error (which can be `null`) and an array of results. + * Invoked with (item, callback). + * @param {Function} [callback(err)] - A callback which is called after all the + * `iteratee` functions have finished, or an error occurs. Results is an array + * containing the concatenated results of the `iteratee` function. Invoked with + * (err, results). + * @example + * + * async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files) { + * // files is now a list of filenames that exist in the 3 directories + * }); + */ var concat = doParallel(concat$1); function doSeries(fn) { @@ -3203,8 +3880,67 @@ }; } + /** + * The same as `concat` but runs only a single async operation at a time. + * + * @name concatSeries + * @static + * @memberOf async + * @see async.concat + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A function to apply to each item in `coll`. + * The iteratee is passed a `callback(err, results)` which must be called once + * it has completed with an error (which can be `null`) and an array of results. + * Invoked with (item, callback). + * @param {Function} [callback(err)] - A callback which is called after all the + * `iteratee` functions have finished, or an error occurs. Results is an array + * containing the concatenated results of the `iteratee` function. Invoked with + * (err, results). + */ var concatSeries = doSeries(concat$1); + /** + * Returns a function that when called, calls-back with the values provided. + * Useful as the first function in a `waterfall`, or for plugging values in to + * `auto`. + * + * @name constant + * @static + * @memberOf async + * @category Util + * @param {...*} arguments... - Any number of arguments to automatically invoke + * callback with. + * @returns {Function} Returns a function that when invoked, automatically + * invokes the callback with the previous given arguments. + * @example + * + * async.waterfall([ + * async.constant(42), + * function (value, next) { + * // value === 42 + * }, + * //... + * ], callback); + * + * async.waterfall([ + * async.constant(filename, "utf8"), + * fs.readFile, + * function (fileData, next) { + * //... + * } + * //... + * ], callback); + * + * async.auto({ + * hostname: async.constant("https://server.net/"), + * port: findFreePort, + * launchServer: ["hostname", "port", function (options, cb) { + * startServer(options, cb); + * }], + * //... + * }, callback); + */ var constant = rest(function (values) { var args = [null].concat(values); return initialParams(function (ignoredArgs, callback) { @@ -3254,10 +3990,84 @@ return x; } + /** + * Returns the first value in `coll` that passes an async truth test. The + * `iteratee` is applied in parallel, meaning the first iteratee to return + * `true` will fire the detect `callback` with that result. That means the + * result might not be the first item in the original `coll` (in terms of order) + * that passes the test. + + * If order within the original `coll` is important, then look at + * `detectSeries`. + * + * @name detect + * @static + * @memberOf async + * @alias find + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The iteratee is passed a `callback(err, truthValue)` which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the `iteratee` functions have finished. + * Result will be the first item in the array that passes the truth test + * (iteratee) or the value `undefined` if none passed. Invoked with + * (err, result). + * @example + * + * async.detect(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, result) { + * // result now equals the first file in the list that exists + * }); + */ var detect = _createTester(eachOf, identity, _findGetResult); + /** + * The same as `detect` but runs a maximum of `limit` async operations at a + * time. + * + * @name detectLimit + * @static + * @memberOf async + * @see async.detect + * @alias findLimit + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The iteratee is passed a `callback(err, truthValue)` which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the `iteratee` functions have finished. + * Result will be the first item in the array that passes the truth test + * (iteratee) or the value `undefined` if none passed. Invoked with + * (err, result). + */ var detectLimit = _createTester(eachOfLimit, identity, _findGetResult); + /** + * The same as `detect` but runs only a single async operation at a time. + * + * @name detectSeries + * @static + * @memberOf async + * @see async.detect + * @alias findSeries + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The iteratee is passed a `callback(err, truthValue)` which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the `iteratee` functions have finished. + * Result will be the first item in the array that passes the truth test + * (iteratee) or the value `undefined` if none passed. Invoked with + * (err, result). + */ var detectSeries = _createTester(eachOfSeries, identity, _findGetResult); function consoleFunc(name) { @@ -3278,8 +4088,72 @@ }); } + /** + * Logs the result of an `async` function to the `console` using `console.dir` + * to display the properties of the resulting object. Only works in Node.js or + * in browsers that support `console.dir` and `console.error` (such as FF and + * Chrome). If multiple arguments are returned from the async function, + * `console.dir` is called on each argument in order. + * + * @name log + * @static + * @memberOf async + * @category Util + * @param {Function} function - The function you want to eventually apply all + * arguments to. + * @param {...*} arguments... - Any number of arguments to apply to the function. + * @example + * + * // in a module + * var hello = function(name, callback) { + * setTimeout(function() { + * callback(null, {hello: name}); + * }, 1000); + * }; + * + * // in the node repl + * node> async.dir(hello, 'world'); + * {hello: 'world'} + */ var dir = consoleFunc('dir'); + /** + * Like {@link async.whilst}, except the `test` is an asynchronous function that + * is passed a callback in the form of `function (err, truth)`. If error is + * passed to `test` or `fn`, the main callback is immediately called with the + * value of the error. + * + * @name during + * @static + * @memberOf async + * @see async.whilst + * @category Control Flow + * @param {Function} test - asynchronous truth test to perform before each + * execution of `fn`. Invoked with (callback). + * @param {Function} fn - A function which is called each time `test` passes. + * The function is passed a `callback(err)`, which must be called once it has + * completed with an optional `err` argument. Invoked with (callback). + * @param {Function} [callback] - A callback which is called after the test + * function has failed and repeated execution of `fn` has stopped. `callback` + * will be passed an error and any arguments passed to the final `fn`'s + * callback. Invoked with (err, [results]); + * @example + * + * var count = 0; + * + * async.during( + * function (callback) { + * return callback(null, count < 5); + * }, + * function (callback) { + * count++; + * setTimeout(callback, 1000); + * }, + * function (err) { + * // 5 seconds have passed + * } + * ); + */ function during(test, iteratee, cb) { cb = cb || noop; @@ -3301,6 +4175,26 @@ test(check); } + /** + * The post-check version of {@link async.during}. To reflect the difference in + * the order of operations, the arguments `test` and `fn` are switched. + * + * Also a version of {@link async.doWhilst} with asynchronous `test` function. + * @name doDuring + * @static + * @memberOf async + * @see async.during + * @category Control Flow + * @param {Function} fn - A function which is called each time `test` passes. + * The function is passed a `callback(err)`, which must be called once it has + * completed with an optional `err` argument. Invoked with (callback). + * @param {Function} test - asynchronous truth test to perform before each + * execution of `fn`. Invoked with (callback). + * @param {Function} [callback] - A callback which is called after the test + * function has failed and repeated execution of `fn` has stopped. `callback` + * will be passed an error and any arguments passed to the final `fn`'s + * callback. Invoked with (err, [results]); + */ function doDuring(iteratee, test, cb) { var calls = 0; @@ -3310,6 +4204,39 @@ }, iteratee, cb); } + /** + * Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when + * stopped, or an error occurs. + * + * @name whilst + * @static + * @memberOf async + * @category Control Flow + * @param {Function} test - synchronous truth test to perform before each + * execution of `fn`. Invoked with (). + * @param {Function} fn - A function which is called each time `test` passes. + * The function is passed a `callback(err)`, which must be called once it has + * completed with an optional `err` argument. Invoked with (callback). + * @param {Function} [callback] - A callback which is called after the test + * function has failed and repeated execution of `fn` has stopped. `callback` + * will be passed an error and any arguments passed to the final `fn`'s + * callback. Invoked with (err, [results]); + * @example + * + * var count = 0; + * async.whilst( + * function() { return count < 5; }, + * function(callback) { + * count++; + * setTimeout(function() { + * callback(null, count); + * }, 1000); + * }, + * function (err, n) { + * // 5 seconds have passed, n = 5 + * } + * ); + */ function whilst(test, iteratee, cb) { cb = cb || noop; if (!test()) return cb(null); @@ -3321,6 +4248,27 @@ iteratee(next); } + /** + * The post-check version of {@link async.whilst}. To reflect the difference in + * the order of operations, the arguments `test` and `fn` are switched. + * + * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. + * + * @name doWhilst + * @static + * @memberOf async + * @see async.whilst + * @category Control Flow + * @param {Function} fn - A function which is called each time `test` passes. + * The function is passed a `callback(err)`, which must be called once it has + * completed with an optional `err` argument. Invoked with (callback). + * @param {Function} test - synchronous truth test to perform before each + * execution of `fn`. Invoked with (). + * @param {Function} [callback] - A callback which is called after the test + * function has failed and repeated execution of `fn` has stopped. `callback` + * will be passed an error and any arguments passed to the final `fn`'s + * callback. Invoked with (err, [results]); + */ function doWhilst(iteratee, test, cb) { var calls = 0; return whilst(function () { @@ -3328,6 +4276,25 @@ }, iteratee, cb); } + /** + * Like {@link async.doWhilst}, except the `test` is inverted. Note the + * argument ordering differs from `until`. + * + * @name doUntil + * @static + * @memberOf async + * @see async.doWhilst + * @category Control Flow + * @param {Function} fn - A function which is called each time `test` fails. + * The function is passed a `callback(err)`, which must be called once it has + * completed with an optional `err` argument. Invoked with (callback). + * @param {Function} test - synchronous truth test to perform before each + * execution of `fn`. Invoked with (). + * @param {Function} [callback] - A callback which is called after the test + * function has passed and repeated execution of `fn` has stopped. `callback` + * will be passed an error and any arguments passed to the final `fn`'s + * callback. Invoked with (err, [results]); + */ function doUntil(iteratee, test, cb) { return doWhilst(iteratee, function () { return !test.apply(this, arguments); @@ -3340,14 +4307,144 @@ }; } + /** + * The same as `each` but runs a maximum of `limit` async operations at a time. + * + * @name eachLimit + * @static + * @memberOf async + * @see async.each + * @alias forEachLimit + * @category Collection + * @param {Array|Object} coll - A colleciton to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} iteratee - A function to apply to each item in `coll`. The + * iteratee is passed a `callback(err)` which must be called once it has + * completed. If no error has occurred, the `callback` should be run without + * arguments or with an explicit `null` argument. The array index is not passed + * to the iteratee. Invoked with (item, callback). If you need the index, use + * `eachOfLimit`. + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ function eachLimit(arr, limit, iteratee, cb) { - return _eachOfLimit(limit)(arr, _withoutIndex(iteratee), cb); + return _eachOfLimit(limit)(arr, _withoutIndex(iteratee), cb); } + /** + * Applies the function `iteratee` to each item in `coll`, in parallel. + * The `iteratee` is called with an item from the list, and a callback for when + * it has finished. If the `iteratee` passes an error to its `callback`, the + * main `callback` (for the `each` function) is immediately called with the + * error. + * + * Note, that since this function applies `iteratee` to each item in parallel, + * there is no guarantee that the iteratee functions will complete in order. + * + * @name each + * @static + * @memberOf async + * @alias forEach + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A function to apply to each item + * in `coll`. The iteratee is passed a `callback(err)` which must be called once + * it has completed. If no error has occurred, the `callback` should be run + * without arguments or with an explicit `null` argument. The array index is not + * passed to the iteratee. Invoked with (item, callback). If you need the index, + * use `eachOf`. + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + * @example + * + * // assuming openFiles is an array of file names and saveFile is a function + * // to save the modified contents of that file: + * + * async.each(openFiles, saveFile, function(err){ + * // if any of the saves produced an error, err would equal that error + * }); + * + * // assuming openFiles is an array of file names + * async.each(openFiles, function(file, callback) { + * + * // Perform operation on file here. + * console.log('Processing file ' + file); + * + * if( file.length > 32 ) { + * console.log('This file name is too long'); + * callback('File name too long'); + * } else { + * // Do work to process file here + * console.log('File processed'); + * callback(); + * } + * }, function(err) { + * // if any of the file processing produced an error, err would equal that error + * if( err ) { + * // One of the iterations produced an error. + * // All processing will now stop. + * console.log('A file failed to process'); + * } else { + * console.log('All files have been processed successfully'); + * } + * }); + */ var each = doLimit(eachLimit, Infinity); + /** + * The same as `each` but runs only a single async operation at a time. + * + * @name eachSeries + * @static + * @memberOf async + * @see async.each + * @alias forEachSeries + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A function to apply to each + * item in `coll`. The iteratee is passed a `callback(err)` which must be called + * once it has completed. If no error has occurred, the `callback` should be run + * without arguments or with an explicit `null` argument. The array index is + * not passed to the iteratee. Invoked with (item, callback). If you need the + * index, use `eachOfSeries`. + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ var eachSeries = doLimit(eachLimit, 1); + /** + * Wrap an async function and ensure it calls its callback on a later tick of + * the event loop. If the function already calls its callback on a next tick, + * no extra deferral is added. This is useful for preventing stack overflows + * (`RangeError: Maximum call stack size exceeded`) and generally keeping + * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) + * contained. + * + * @name ensureAsync + * @static + * @memberOf async + * @category Util + * @param {Function} fn - an async function, one that expects a node-style + * callback as its last argument. + * @returns {Function} Returns a wrapped function with the exact same call + * signature as the function passed in. + * @example + * + * function sometimesAsync(arg, callback) { + * if (cache[arg]) { + * return callback(null, cache[arg]); // this would be synchronous!! + * } else { + * doSomeIO(arg, callback); // this IO would be asynchronous + * } + * } + * + * // this has a risk of stack overflows if many results are cached in a row + * async.mapSeries(args, sometimesAsync, done); + * + * // this will defer sometimesAsync's callback if necessary, + * // preventing stack overflows + * async.mapSeries(args, async.ensureAsync(sometimesAsync), done); + */ function ensureAsync(fn) { return initialParams(function (args, callback) { var sync = true; @@ -3370,10 +4467,74 @@ return !v; } + /** + * The same as `every` but runs a maximum of `limit` async operations at a time. + * + * @name everyLimit + * @static + * @memberOf async + * @see async.every + * @alias allLimit + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} iteratee - A truth test to apply to each item in the + * collection in parallel. The iteratee is passed a `callback(err, truthValue)` + * which must be called with a boolean argument once it has completed. Invoked + * with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result will be either `true` or `false` + * depending on the values of the async tests. Invoked with (err, result). + */ var everyLimit = _createTester(eachOfLimit, notId, notId); + /** + * Returns `true` if every element in `coll` satisfies an async test. If any + * iteratee call returns `false`, the main `callback` is immediately called. + * + * @name every + * @static + * @memberOf async + * @alias all + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in the + * collection in parallel. The iteratee is passed a `callback(err, truthValue)` + * which must be called with a boolean argument once it has completed. Invoked + * with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result will be either `true` or `false` + * depending on the values of the async tests. Invoked with (err, result). + * @example + * + * async.every(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, result) { + * // if result is true then every file exists + * }); + */ var every = doLimit(everyLimit, Infinity); + /** + * The same as `every` but runs only a single async operation at a time. + * + * @name everySeries + * @static + * @memberOf async + * @see async.every + * @alias allSeries + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in the + * collection in parallel. The iteratee is passed a `callback(err, truthValue)` + * which must be called with a boolean argument once it has completed. Invoked + * with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result will be either `true` or `false` + * depending on the values of the async tests. Invoked with (err, result). + */ var everySeries = doLimit(everyLimit, 1); function _filter(eachfn, arr, iteratee, callback) { @@ -3400,12 +4561,100 @@ }); } + /** + * The same as `filter` but runs a maximum of `limit` async operations at a + * time. + * + * @name filterLimit + * @static + * @memberOf async + * @see async.filter + * @alias selectLimit + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The `iteratee` is passed a `callback(err, truthValue)`, which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + */ var filterLimit = doParallelLimit(_filter); + /** + * Returns a new array of all the values in `coll` which pass an async truth + * test. This operation is performed in parallel, but the results array will be + * in the same order as the original. + * + * @name filter + * @static + * @memberOf async + * @alias select + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The `iteratee` is passed a `callback(err, truthValue)`, which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + * @example + * + * async.filter(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, results) { + * // results now equals an array of the existing files + * }); + */ var filter = doLimit(filterLimit, Infinity); + /** + * The same as `filter` but runs only a single async operation at a time. + * + * @name filterSeries + * @static + * @memberOf async + * @see async.filter + * @alias selectSeries + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The `iteratee` is passed a `callback(err, truthValue)`, which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results) + */ var filterSeries = doLimit(filterLimit, 1); + /** + * Calls the asynchronous function `fn` with a callback parameter that allows it + * to call itself again, in series, indefinitely. + + * If an error is passed to the + * callback then `errback` is called with the error, and execution stops, + * otherwise it will never be called. + * + * @name forever + * @static + * @memberOf async + * @category Control Flow + * @param {Function} fn - a function to call repeatedly. Invoked with (next). + * @param {Function} [errback] - when `fn` passes an error to it's callback, + * this function will be called, and execution stops. Invoked with (err). + * @example + * + * async.forever( + * function(next) { + * // next is suitable for passing to things that need a callback(err [, whatever]); + * // it will result in this function being called again. + * }, + * function(err) { + * // if next is called with a value in its first parameter, it will appear + * // in here as 'err', and execution will stop. + * } + * ); + */ function forever(fn, cb) { var done = onlyOnce(cb || noop); var task = ensureAsync(fn); @@ -3417,6 +4666,39 @@ next(); } + /** + * Creates an iterator function which calls the next function in the `tasks` + * array, returning a continuation to call the next one after that. It's also + * possible to “peek” at the next iterator with `iterator.next()`. + * + * This function is used internally by the `async` module, but can be useful + * when you want to manually control the flow of functions in series. + * + * @name iterator + * @static + * @memberOf async + * @category Control Flow + * @param {Array} tasks - An array of functions to run. + * @returns The next function to run in the series. + * @example + * + * var iterator = async.iterator([ + * function() { sys.p('one'); }, + * function() { sys.p('two'); }, + * function() { sys.p('three'); } + * ]); + * + * node> var iterator2 = iterator(); + * 'one' + * node> var iterator3 = iterator2(); + * 'two' + * node> iterator3(); + * 'three' + * node> var nextfn = iterator2.next(); + * node> nextfn(); + * 'three' + */ + function iterator$1 (tasks) { function makeCallback(index) { function fn() { @@ -3433,12 +4715,73 @@ return makeCallback(0); } + /** + * Logs the result of an `async` function to the `console`. Only works in + * Node.js or in browsers that support `console.log` and `console.error` (such + * as FF and Chrome). If multiple arguments are returned from the async + * function, `console.log` is called on each argument in order. + * + * @name log + * @static + * @memberOf async + * @category Util + * @param {Function} function - The function you want to eventually apply all + * arguments to. + * @param {...*} arguments... - Any number of arguments to apply to the function. + * @example + * + * // in a module + * var hello = function(name, callback) { + * setTimeout(function() { + * callback(null, 'hello ' + name); + * }, 1000); + * }; + * + * // in the node repl + * node> async.log(hello, 'world'); + * 'hello world' + */ var log = consoleFunc('log'); function has(obj, key) { return key in obj; } + /** + * Caches the results of an `async` function. When creating a hash to store + * function results against, the callback is omitted from the hash and an + * optional hash function can be used. + * + * If no hash function is specified, the first argument is used as a hash key, + * which may work reasonably if it is a string or a data type that converts to a + * distinct string. Note that objects and arrays will not behave reasonably. + * Neither will cases where the other arguments are significant. In such cases, + * specify your own hash function. + * + * The cache of results is exposed as the `memo` property of the function + * returned by `memoize`. + * + * @name memoize + * @static + * @memberOf async + * @category Util + * @param {Function} fn - The function to proxy and cache results from. + * @param {Function} hasher - An optional function for generating a custom hash + * for storing results. It has all the arguments applied to it apart from the + * callback, and must be synchronous. + * @example + * + * var slow_fn = function(name, callback) { + * // do something + * callback(null, result); + * }; + * var fn = async.memoize(slow_fn); + * + * // fn can now be used as if it were slow_fn + * fn('some name', function() { + * // callback + * }); + */ function memoize$1(fn, hasher) { var memo = Object.create(null); var queues = Object.create(null); @@ -3485,18 +4828,221 @@ }); } + /** + * The same as `parallel` but runs a maximum of `limit` async operations at a + * time. + * + * @name parallel + * @static + * @memberOf async + * @see async.parallel + * @category Control Flow + * @param {Array|Collection} tasks - A collection containing functions to run. + * Each function is passed a `callback(err, result)` which it must call on + * completion with an error `err` (which can be `null`) and an optional `result` + * value. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed successfully. This function gets a results array + * (or object) containing all the result arguments passed to the task callbacks. + * Invoked with (err, results). + */ function parallelLimit(tasks, limit, cb) { - return _parallel(_eachOfLimit(limit), tasks, cb); + return _parallel(_eachOfLimit(limit), tasks, cb); } + /** + * Run the `tasks` collection of functions in parallel, without waiting until + * the previous function has completed. If any of the functions pass an error to + * its callback, the main `callback` is immediately called with the value of the + * error. Once the `tasks` have completed, the results are passed to the final + * `callback` as an array. + * + * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about + * parallel execution of code. If your tasks do not use any timers or perform + * any I/O, they will actually be executed in series. Any synchronous setup + * sections for each task will happen one after the other. JavaScript remains + * single-threaded. + * + * It is also possible to use an object instead of an array. Each property will + * be run as a function and the results will be passed to the final `callback` + * as an object instead of an array. This can be a more readable way of handling + * results from {@link async.parallel}. + * + * @name parallel + * @static + * @memberOf async + * @category Control Flow + * @param {Array|Object} tasks - A collection containing functions to run. + * Each function is passed a `callback(err, result)` which it must call on + * completion with an error `err` (which can be `null`) and an optional `result` + * value. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed successfully. This function gets a results array + * (or object) containing all the result arguments passed to the task callbacks. + * Invoked with (err, results). + * @example + * async.parallel([ + * function(callback) { + * setTimeout(function() { + * callback(null, 'one'); + * }, 200); + * }, + * function(callback) { + * setTimeout(function() { + * callback(null, 'two'); + * }, 100); + * } + * ], + * // optional callback + * function(err, results) { + * // the results array will equal ['one','two'] even though + * // the second function had a shorter timeout. + * }); + * + * // an example using an object instead of an array + * async.parallel({ + * one: function(callback) { + * setTimeout(function() { + * callback(null, 1); + * }, 200); + * }, + * two: function(callback) { + * setTimeout(function() { + * callback(null, 2); + * }, 100); + * } + * }, function(err, results) { + * // results is now equals to: {one: 1, two: 2} + * }); + */ var parallel = doLimit(parallelLimit, Infinity); + /** + * A queue of tasks for the worker function to complete. + * @typedef {Object} queue + * @property {Function} length - a function returning the number of items + * waiting to be processed. Invoke with (). + * @property {Function} started - a function returning whether or not any + * items have been pushed and processed by the queue. Invoke with (). + * @property {Function} running - a function returning the number of items + * currently being processed. Invoke with (). + * @property {Function} workersList - a function returning the array of items + * currently being processed. Invoke with (). + * @property {Function} idle - a function returning false if there are items + * waiting or being processed, or true if not. Invoke with (). + * @property {number} concurrency - an integer for determining how many `worker` + * functions should be run in parallel. This property can be changed after a + * `queue` is created to alter the concurrency on-the-fly. + * @property {Function} push - add a new task to the `queue`. Calls `callback` + * once the `worker` has finished processing the task. Instead of a single task, + * a `tasks` array can be submitted. The respective callback is used for every + * task in the list. Invoke with (task, [callback]), + * @property {Function} unshift - add a new task to the front of the `queue`. + * Invoke with (task, [callback]). + * @property {Function} saturated - a callback that is called when the number of + * running workers hits the `concurrency` limit, and further tasks will be + * queued. + * @property {Function} unsaturated - a callback that is called when the number + * of running workers is less than the `concurrency` & `buffer` limits, and + * further tasks will not be queued. + * @property {number} buffer - A minimum threshold buffer in order to say that + * the `queue` is `unsaturated`. + * @property {Function} empty - a callback that is called when the last item + * from the `queue` is given to a `worker`. + * @property {Function} drain - a callback that is called when the last item + * from the `queue` has returned from the `worker`. + * @property {boolean} paused - a boolean for determining whether the queue is + * in a paused state. + * @property {Function} pause - a function that pauses the processing of tasks + * until `resume()` is called. Invoke with (). + * @property {Function} resume - a function that resumes the processing of + * queued tasks when the queue is paused. Invoke with (). + * @property {Function} kill - a function that removes the `drain` callback and + * empties remaining tasks from the queue forcing it to go idle. Invoke with (). + */ + + /** + * Creates a `queue` object with the specified `concurrency`. Tasks added to the + * `queue` are processed in parallel (up to the `concurrency` limit). If all + * `worker`s are in progress, the task is queued until one becomes available. + * Once a `worker` completes a `task`, that `task`'s callback is called. + * + * @name queue + * @static + * @memberOf async + * @category Control Flow + * @param {Function} worker - An asynchronous function for processing a queued + * task, which must call its `callback(err)` argument when finished, with an + * optional `error` as an argument. If you want to handle errors from an + * individual task, pass a callback to `q.push()`. Invoked with + * (task, callback). + * @param {number} [concurrency=1] - An `integer` for determining how many + * `worker` functions should be run in parallel. If omitted, the concurrency + * defaults to `1`. If the concurrency is `0`, an error is thrown. + * @returns {queue} A queue object to manage the tasks. Callbacks can + * attached as certain properties to listen for specific events during the + * lifecycle of the queue. + * @example + * + * // create a queue object with concurrency 2 + * var q = async.queue(function(task, callback) { + * console.log('hello ' + task.name); + * callback(); + * }, 2); + * + * // assign a callback + * q.drain = function() { + * console.log('all items have been processed'); + * }; + * + * // add some items to the queue + * q.push({name: 'foo'}, function(err) { + * console.log('finished processing foo'); + * }); + * q.push({name: 'bar'}, function (err) { + * console.log('finished processing bar'); + * }); + * + * // add some items to the queue (batch-wise) + * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) { + * console.log('finished processing item'); + * }); + * + * // add some items to the front of the queue + * q.unshift({name: 'bar'}, function (err) { + * console.log('finished processing bar'); + * }); + */ function queue$1 (worker, concurrency) { - return queue(function (items, cb) { - worker(items[0], cb); - }, concurrency, 1); + return queue(function (items, cb) { + worker(items[0], cb); + }, concurrency, 1); } + /** + * The same as {@link async.queue} only tasks are assigned a priority and + * completed in ascending priority order. + * + * @name priorityQueue + * @static + * @memberOf async + * @see async.queue + * @category Control Flow + * @param {Function} worker - An asynchronous function for processing a queued + * task, which must call its `callback(err)` argument when finished, with an + * optional `error` as an argument. If you want to handle errors from an + * individual task, pass a callback to `q.push()`. Invoked with + * (task, callback). + * @param {number} concurrency - An `integer` for determining how many `worker` + * functions should be run in parallel. If omitted, the concurrency defaults to + * `1`. If the concurrency is `0`, an error is thrown. + * @returns {queue} A priorityQueue object to manage the tasks. There are two + * differences between `queue` and `priorityQueue` objects: + * * `push(task, priority, [callback])` - `priority` should be a number. If an + * array of `tasks` is given, all tasks will be assigned the same priority. + * * The `unshift` method was removed. + */ function priorityQueue (worker, concurrency) { function _compareTasks(a, b) { return a.priority - b.priority; @@ -3539,12 +5085,6 @@ q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item); - if (q.tasks.length === q.concurrency) { - q.saturated(); - } - if (q.tasks.length <= q.concurrency - q.buffer) { - q.unsaturated(); - } setImmediate$1(q.process); }); } @@ -3637,6 +5177,41 @@ : baseEach(collection, baseIteratee(iteratee)); } + /** + * Runs the `tasks` array of functions in parallel, without waiting until the + * previous function has completed. Once any the `tasks` completed or pass an + * error to its callback, the main `callback` is immediately called. It's + * equivalent to `Promise.race()`. + * + * @name race + * @static + * @memberOf async + * @category Control Flow + * @param {Array} tasks - An array containing functions to run. Each function + * is passed a `callback(err, result)` which it must call on completion with an + * error `err` (which can be `null`) and an optional `result` value. + * @param {Function} callback - A callback to run once any of the functions have + * completed. This function gets an error or result from the first function that + * completed. Invoked with (err, result). + * @example + * + * async.race([ + * function(callback) { + * setTimeout(function() { + * callback(null, 'one'); + * }, 200); + * }, + * function(callback) { + * setTimeout(function() { + * callback(null, 'two'); + * }, 100); + * } + * ], + * // main callback + * function(err, result) { + * // the result will be equal to 'two' as it finishes earlier + * }); + */ function race(tasks, cb) { cb = once(cb || noop); if (!isArray(tasks)) return cb(new TypeError('First argument to race must be an array of functions')); @@ -3648,11 +5223,70 @@ var slice = Array.prototype.slice; + /** + * Same as `reduce`, only operates on `coll` in reverse order. + * + * @name reduceRight + * @static + * @memberOf async + * @see async.reduce + * @alias foldr + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {*} memo - The initial state of the reduction. + * @param {Function} iteratee - A function applied to each item in the + * array to produce the next step in the reduction. The `iteratee` is passed a + * `callback(err, reduction)` which accepts an optional error as its first + * argument, and the state of the reduction as the second. If an error is + * passed to the callback, the reduction is stopped and the main `callback` is + * immediately called with the error. Invoked with (memo, item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result is the reduced value. Invoked with + * (err, result). + */ function reduceRight(arr, memo, iteratee, cb) { - var reversed = slice.call(arr).reverse(); - reduce(reversed, memo, iteratee, cb); + var reversed = slice.call(arr).reverse(); + reduce(reversed, memo, iteratee, cb); } + /** + * Wraps the function in another function that always returns data even when it + * errors. + * + * The object returned has either the property `error` or `value`. + * + * @name reflect + * @static + * @memberOf async + * @category Util + * @param {Function} function - The function you want to wrap + * @returns {Function} - A function that always passes null to it's callback as + * the error. The second argument to the callback will be an `object` with + * either an `error` or a `value` property. + * @example + * + * async.parallel([ + * async.reflect(function(callback) { + * // do some stuff ... + * callback(null, 'one'); + * }), + * async.reflect(function(callback) { + * // do some more stuff but error ... + * callback('bad stuff happened'); + * }), + * async.reflect(function(callback) { + * // do some more stuff ... + * callback(null, 'two'); + * }) + * ], + * // optional callback + * function(err, results) { + * // values + * // results[0].value = 'one' + * // results[1].error = 'bad stuff happened' + * // results[2].value = 'two' + * }); + */ function reflect(fn) { return initialParams(function reflectOn(args, reflectCallback) { args.push(rest(function callback(err, cbArgs) { @@ -3689,20 +5323,236 @@ }, callback); } + /** + * The same as `reject` but runs a maximum of `limit` async operations at a + * time. + * + * @name rejectLimit + * @static + * @memberOf async + * @see async.reject + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The `iteratee` is passed a `callback(err, truthValue)`, which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + */ var rejectLimit = doParallelLimit(reject$1); + /** + * The opposite of `filter`. Removes values that pass an `async` truth test. + * + * @name reject + * @static + * @memberOf async + * @see async.filter + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The `iteratee` is passed a `callback(err, truthValue)`, which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + * @example + * + * async.reject(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, results) { + * // results now equals an array of missing files + * createFiles(results); + * }); + */ var reject = doLimit(rejectLimit, Infinity); + /** + * A helper function that wraps an array of functions with reflect. + * + * @name reflectAll + * @static + * @memberOf async + * @see async.reflect + * @category Util + * @param {Array} tasks - The array of functions to wrap in `async.reflect`. + * @returns {Array} Returns an array of functions, each function wrapped in + * `async.reflect` + * @example + * + * let tasks = [ + * function(callback) { + * setTimeout(function() { + * callback(null, 'one'); + * }, 200); + * }, + * function(callback) { + * // do some more stuff but error ... + * callback(new Error('bad stuff happened')); + * }, + * function(callback) { + * setTimeout(function() { + * callback(null, 'two'); + * }, 100); + * } + * ]; + * + * async.parallel(async.reflectAll(tasks), + * // optional callback + * function(err, results) { + * // values + * // results[0].value = 'one' + * // results[1].error = Error('bad stuff happened') + * // results[2].value = 'two' + * }); + */ function reflectAll(tasks) { - return tasks.map(reflect); + return tasks.map(reflect); } + /** + * The same as `reject` but runs only a single async operation at a time. + * + * @name rejectSeries + * @static + * @memberOf async + * @see async.reject + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The `iteratee` is passed a `callback(err, truthValue)`, which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + */ var rejectSeries = doLimit(rejectLimit, 1); + /** + * Run the functions in the `tasks` collection in series, each one running once + * the previous function has completed. If any functions in the series pass an + * error to its callback, no more functions are run, and `callback` is + * immediately called with the value of the error. Otherwise, `callback` + * receives an array of results when `tasks` have completed. + * + * It is also possible to use an object instead of an array. Each property will + * be run as a function, and the results will be passed to the final `callback` + * as an object instead of an array. This can be a more readable way of handling + * results from {@link async.series}. + * + * **Note** that while many implementations preserve the order of object + * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) + * explicitly states that + * + * > The mechanics and order of enumerating the properties is not specified. + * + * So if you rely on the order in which your series of functions are executed, + * and want this to work on all platforms, consider using an array. + * + * @name series + * @static + * @memberOf async + * @category Control Flow + * @param {Array|Object} tasks - A collection containing functions to run, each + * function is passed a `callback(err, result)` it must call on completion with + * an error `err` (which can be `null`) and an optional `result` value. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed. This function gets a results array (or object) + * containing all the result arguments passed to the `task` callbacks. Invoked + * with (err, result). + * @example + * async.series([ + * function(callback) { + * // do some stuff ... + * callback(null, 'one'); + * }, + * function(callback) { + * // do some more stuff ... + * callback(null, 'two'); + * } + * ], + * // optional callback + * function(err, results) { + * // results is now equal to ['one', 'two'] + * }); + * + * async.series({ + * one: function(callback) { + * setTimeout(function() { + * callback(null, 1); + * }, 200); + * }, + * two: function(callback){ + * setTimeout(function() { + * callback(null, 2); + * }, 100); + * } + * }, function(err, results) { + * // results is now equal to: {one: 1, two: 2} + * }); + */ function series(tasks, cb) { - return _parallel(eachOfSeries, tasks, cb); + return _parallel(eachOfSeries, tasks, cb); } + /** + * Attempts to get a successful response from `task` no more than `times` times + * before returning an error. If the task is successful, the `callback` will be + * passed the result of the successful task. If all attempts fail, the callback + * will be passed the error and result (if any) of the final attempt. + * + * @name retry + * @static + * @memberOf async + * @category Control Flow + * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an + * object with `times` and `interval` or a number. + * * `times` - The number of attempts to make before giving up. The default + * is `5`. + * * `interval` - The time to wait between retries, in milliseconds. The + * default is `0`. + * * If `opts` is a number, the number specifies the number of times to retry, + * with the default interval of `0`. + * @param {Function} task - A function which receives two arguments: (1) a + * `callback(err, result)` which must be called when finished, passing `err` + * (which can be `null`) and the `result` of the function's execution, and (2) + * a `results` object, containing the results of the previously executed + * functions (if nested inside another control flow). Invoked with + * (callback, results). + * @param {Function} [callback] - An optional callback which is called when the + * task has succeeded, or after the final failed attempt. It receives the `err` + * and `result` arguments of the last attempt at completing the `task`. Invoked + * with (err, results). + * @example + * + * // The `retry` function can be used as a stand-alone control flow by passing + * // a callback, as shown below: + * + * // try calling apiMethod 3 times + * async.retry(3, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod 3 times, waiting 200 ms between each retry + * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod the default 5 times no delay between each retry + * async.retry(apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // It can also be embedded within other control flow functions to retry + * // individual methods that are not as reliable, like this: + * async.auto({ + * users: api.getUsers.bind(api), + * payments: async.retry(3, api.getPayments.bind(api)) + * }, function(err, results) { + * // do something with the results + * }); + */ function retry(times, task, callback) { var DEFAULT_TIMES = 5; var DEFAULT_INTERVAL = 0; @@ -3769,6 +5619,29 @@ } } + /** + * A close relative of `retry`. This method wraps a task and makes it + * retryable, rather than immediately calling it with retries. + * + * @name retryable + * @static + * @memberOf async + * @see async.retry + * @category Control Flow + * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional + * options, exactly the same as from `retry` + * @param {Function} task - the asynchronous function to wrap + * @returns {Functions} The wrapped function, which when invoked, will retry on + * an error, based on the parameters specified in `opts`. + * @example + * + * async.auto({ + * dep1: async.retryable(3, getFromFlakyService), + * process: ["dep1", async.retryable(3, function (results, cb) { + * maybeProcessData(results.dep1, cb); + * })] + * }, callback); + */ function retryable (opts, task) { if (!task) { task = opts; @@ -3783,12 +5656,125 @@ }); } + /** + * The same as `some` but runs a maximum of `limit` async operations at a time. + * + * @name someLimit + * @static + * @memberOf async + * @see async.some + * @alias anyLimit + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} iteratee - A truth test to apply to each item in the array + * in parallel. The iteratee is passed a `callback(err, truthValue)` which must + * be called with a boolean argument once it has completed. Invoked with + * (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the iteratee functions have finished. + * Result will be either `true` or `false` depending on the values of the async + * tests. Invoked with (err, result). + */ var someLimit = _createTester(eachOfLimit, Boolean, identity); + /** + * Returns `true` if at least one element in the `coll` satisfies an async test. + * If any iteratee call returns `true`, the main `callback` is immediately + * called. + * + * @name some + * @static + * @memberOf async + * @alias any + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in the array + * in parallel. The iteratee is passed a `callback(err, truthValue)` which must + * be called with a boolean argument once it has completed. Invoked with + * (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the iteratee functions have finished. + * Result will be either `true` or `false` depending on the values of the async + * tests. Invoked with (err, result). + * @example + * + * async.some(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, result) { + * // if result is true then at least one of the files exists + * }); + */ var some = doLimit(someLimit, Infinity); + /** + * The same as `some` but runs only a single async operation at a time. + * + * @name someSeries + * @static + * @memberOf async + * @see async.some + * @alias anySeries + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in the array + * in parallel. The iteratee is passed a `callback(err, truthValue)` which must + * be called with a boolean argument once it has completed. Invoked with + * (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the iteratee functions have finished. + * Result will be either `true` or `false` depending on the values of the async + * tests. Invoked with (err, result). + */ var someSeries = doLimit(someLimit, 1); + /** + * Sorts a list by the results of running each `coll` value through an async + * `iteratee`. + * + * @name sortBy + * @static + * @memberOf async + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A function to apply to each item in `coll`. + * The iteratee is passed a `callback(err, sortValue)` which must be called once + * it has completed with an error (which can be `null`) and a value to use as + * the sort criteria. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished, or an error occurs. Results is the items + * from the original `coll` sorted by the values returned by the `iteratee` + * calls. Invoked with (err, results). + * @example + * + * async.sortBy(['file1','file2','file3'], function(file, callback) { + * fs.stat(file, function(err, stats) { + * callback(err, stats.mtime); + * }); + * }, function(err, results) { + * // results is now the original array of files sorted by + * // modified date + * }); + * + * // By modifying the callback parameter the + * // sorting order can be influenced: + * + * // ascending order + * async.sortBy([1,9,3,5], function(x, callback) { + * callback(null, x); + * }, function(err,result) { + * // result callback + * }); + * + * // descending order + * async.sortBy([1,9,3,5], function(x, callback) { + * callback(null, x*-1); //<- x*-1 instead of x, turns the order around + * }, function(err,result) { + * // result callback + * }); + */ function sortBy(arr, iteratee, cb) { map(arr, function (x, cb) { iteratee(x, function (err, criteria) { @@ -3807,6 +5793,28 @@ } } + /** + * Sets a time limit on an asynchronous function. If the function does not call + * its callback within the specified miliseconds, it will be called with a + * timeout error. The code property for the error object will be `'ETIMEDOUT'`. + * + * @name timeout + * @static + * @memberOf async + * @category Util + * @param {Function} function - The asynchronous function you want to set the + * time limit. + * @param {number} miliseconds - The specified time limit. + * @param {*} [info] - Any variable you want attached (`string`, `object`, etc) + * to timeout Error for more information.. + * @returns {Function} Returns a wrapped function that can be used with any of + * the control flow functions. + * @example + * + * async.timeout(function(callback) { + * doAsyncTask(callback); + * }, 1000); + */ function timeout(asyncFn, miliseconds, info) { var originalCallback, timer; var timedOut = false; @@ -3863,40 +5871,232 @@ return result; } + /** + * The same as {@link times} but runs a maximum of `limit` async operations at a + * time. + * + * @name timesLimit + * @static + * @memberOf async + * @see async.times + * @category Control Flow + * @param {number} n - The number of times to run the function. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} iteratee - The function to call `n` times. Invoked with the + * iteration index and a callback (n, next). + * @param {Function} callback - see {@link async.map}. + */ function timeLimit(count, limit, iteratee, cb) { - return mapLimit(baseRange(0, count, 1), limit, iteratee, cb); + return mapLimit(baseRange(0, count, 1), limit, iteratee, cb); } + /** + * Calls the `iteratee` function `n` times, and accumulates results in the same + * manner you would use with {@link async.map}. + * + * @name times + * @static + * @memberOf async + * @see async.map + * @category Control Flow + * @param {number} n - The number of times to run the function. + * @param {Function} iteratee - The function to call `n` times. Invoked with the + * iteration index and a callback (n, next). + * @param {Function} callback - see {@link async.map}. + * @example + * + * // Pretend this is some complicated async factory + * var createUser = function(id, callback) { + * callback(null, { + * id: 'user' + id + * }); + * }; + * + * // generate 5 users + * async.times(5, function(n, next) { + * createUser(n, function(err, user) { + * next(err, user); + * }); + * }, function(err, users) { + * // we should now have 5 users + * }); + */ var times = doLimit(timeLimit, Infinity); + /** + * The same as {@link async.times} but runs only a single async operation at a time. + * + * @name timesSeries + * @static + * @memberOf async + * @see async.times + * @category Control Flow + * @param {number} n - The number of times to run the function. + * @param {Function} iteratee - The function to call `n` times. Invoked with the + * iteration index and a callback (n, next). + * @param {Function} callback - see {@link async.map}. + */ var timesSeries = doLimit(timeLimit, 1); - function transform(arr, memo, iteratee, callback) { + /** + * A relative of `reduce`. Takes an Object or Array, and iterates over each + * element in series, each step potentially mutating an `accumulator` value. + * The type of the accumulator defaults to the type of collection passed in. + * + * @name transform + * @static + * @memberOf async + * @category Collection + * @param {Array|Object} coll - A collection to iterate over. + * @param {*} [accumulator] - The initial state of the transform. If omitted, + * it will default to an empty Object or Array, depending on the type of `coll` + * @param {Function} iteratee - A function applied to each item in the + * collection that potentially modifies the accumulator. The `iteratee` is + * passed a `callback(err)` which accepts an optional error as its first + * argument. If an error is passed to the callback, the transform is stopped + * and the main `callback` is immediately called with the error. + * Invoked with (accumulator, item, key, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result is the transformed accumulator. + * Invoked with (err, result). + * @example + * + * async.transform([1,2,3], function(acc, item, index, callback) { + * // pointless async: + * process.nextTick(function() { + * acc.push(item * 2) + * callback(null) + * }); + * }, function(err, result) { + * // result is now equal to [2, 4, 6] + * }); + * + * @example + * + * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) { + * setImmediate(function () { + * obj[key] = val * 2; + * callback(); + * }) + * }, function (err, result) { + * // result is equal to {a: 2, b: 4, c: 6} + * }) + */ + function transform(arr, acc, iteratee, callback) { if (arguments.length === 3) { callback = iteratee; - iteratee = memo; - memo = isArray(arr) ? [] : {}; + iteratee = acc; + acc = isArray(arr) ? [] : {}; } eachOf(arr, function (v, k, cb) { - iteratee(memo, v, k, cb); + iteratee(acc, v, k, cb); }, function (err) { - callback(err, memo); + callback(err, acc); }); } + /** + * Undoes a {@link async.memoize}d function, reverting it to the original, + * unmemoized form. Handy for testing. + * + * @name unmemoize + * @static + * @memberOf async + * @see async.memoize + * @category Util + * @param {Function} fn - the memoized function + */ + function unmemoize(fn) { return function () { return (fn.unmemoized || fn).apply(null, arguments); }; } + /** + * Repeatedly call `fn` until `test` returns `true`. Calls `callback` when + * stopped, or an error occurs. `callback` will be passed an error and any + * arguments passed to the final `fn`'s callback. + * + * The inverse of {@link async.whilst}. + * + * @name until + * @static + * @memberOf async + * @see async.whilst + * @category Control Flow + * @param {Function} test - synchronous truth test to perform before each + * execution of `fn`. Invoked with (). + * @param {Function} fn - A function which is called each time `test` fails. + * The function is passed a `callback(err)`, which must be called once it has + * completed with an optional `err` argument. Invoked with (callback). + * @param {Function} [callback] - A callback which is called after the test + * function has passed and repeated execution of `fn` has stopped. `callback` + * will be passed an error and any arguments passed to the final `fn`'s + * callback. Invoked with (err, [results]); + */ function until(test, iteratee, cb) { return whilst(function () { return !test.apply(this, arguments); }, iteratee, cb); } + /** + * Runs the `tasks` array of functions in series, each passing their results to + * the next in the array. However, if any of the `tasks` pass an error to their + * own callback, the next function is not executed, and the main `callback` is + * immediately called with the error. + * + * @name waterfall + * @static + * @memberOf async + * @category Control Flow + * @param {Array} tasks - An array of functions to run, each function is passed + * a `callback(err, result1, result2, ...)` it must call on completion. The + * first argument is an error (which can be `null`) and any further arguments + * will be passed as arguments in order to the next task. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed. This will be passed the results of the last task's + * callback. Invoked with (err, [results]). + * @example + * + * async.waterfall([ + * function(callback) { + * callback(null, 'one', 'two'); + * }, + * function(arg1, arg2, callback) { + * // arg1 now equals 'one' and arg2 now equals 'two' + * callback(null, 'three'); + * }, + * function(arg1, callback) { + * // arg1 now equals 'three' + * callback(null, 'done'); + * } + * ], function (err, result) { + * // result now equals 'done' + * }); + * + * // Or, with named functions: + * async.waterfall([ + * myFirstFunction, + * mySecondFunction, + * myLastFunction, + * ], function (err, result) { + * // result now equals 'done' + * }); + * function myFirstFunction(callback) { + * callback(null, 'one', 'two'); + * } + * function mySecondFunction(arg1, arg2, callback) { + * // arg1 now equals 'one' and arg2 now equals 'two' + * callback(null, 'three'); + * } + * function myLastFunction(arg1, callback) { + * // arg1 now equals 'three' + * callback(null, 'done'); + * } + */ function waterfall (tasks, cb) { cb = once(cb || noop); if (!isArray(tasks)) return cb(new Error('First argument to waterfall must be an array of functions')); diff --git a/dist/async.min.js b/dist/async.min.js index 4798cc7..6274bc3 100644 --- a/dist/async.min.js +++ b/dist/async.min.js @@ -1,2 +1,2 @@ -!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.async=n.async||{})}(this,function(n){"use strict";function t(n,t,r){var e=r.length;switch(e){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function r(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function e(n){var t=r(n)?Ht.call(n):"";return t==Vt||t==Qt}function o(n){return!!n&&"object"==typeof n}function u(n){return"symbol"==typeof n||o(n)&&Xt.call(n)==Jt}function i(n){if("number"==typeof n)return n;if(u(n))return Yt;if(r(n)){var t=e(n.valueOf)?n.valueOf():n;n=r(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(Zt,"");var o=tr.test(n);return o||rr.test(n)?er(n.slice(2),o?2:8):nr.test(n)?Yt:+n}function c(n){if(!n)return 0===n?n:0;if(n=i(n),n===or||n===-or){var t=0>n?-1:1;return t*ur}var r=n%1;return n===n?r?n-r:n:0}function a(n,r){if("function"!=typeof n)throw new TypeError(ir);return r=cr(void 0===r?n.length-1:c(r),0),function(){for(var e=arguments,o=-1,u=cr(e.length-r,0),i=Array(u);++o<u;)i[o]=e[r+o];switch(r){case 0:return n.call(this,i);case 1:return n.call(this,e[0],i);case 2:return n.call(this,e[0],e[1],i)}var c=Array(r+1);for(o=-1;++o<r;)c[o]=e[o];return c[r]=i,t(n,this,c)}}function f(n){return a(function(t){var r=t.pop();n.call(this,t,r)})}function l(n){return a(function(t,r){var e=f(function(r,e){var o=this;return n(t,function(n,t){n.apply(o,r.concat([t]))},e)});return r.length?e.apply(this,r):e})}function s(){}function p(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}function y(n){return function(t){return null==t?void 0:t[n]}}function v(n){return"number"==typeof n&&n>-1&&n%1==0&&fr>=n}function h(n){return null!=n&&v(ar(n))&&!e(n)}function m(n){return lr&&n[lr]&&n[lr]()}function d(n){return sr(Object(n))}function g(n,t){return yr.call(n,t)||"object"==typeof n&&t in n&&null===d(n)}function b(n){return vr(Object(n))}function j(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function w(n){return o(n)&&h(n)}function _(n){return w(n)&&dr.call(n,"callee")&&(!br.call(n,"callee")||gr.call(n)==hr)}function O(n){return"string"==typeof n||!jr(n)&&o(n)&&Or.call(n)==wr}function S(n){var t=n?n.length:void 0;return v(t)&&(jr(n)||O(n)||_(n))?j(t,String):null}function k(n,t){return n="number"==typeof n||kr.test(n)?+n:-1,t=null==t?Sr:t,n>-1&&n%1==0&&t>n}function E(n){var t=n&&n.constructor,r="function"==typeof t&&t.prototype||Er;return n===r}function A(n){var t=E(n);if(!t&&!h(n))return b(n);var r=S(n),e=!!r,o=r||[],u=o.length;for(var i in n)!g(n,i)||e&&("length"==i||k(i,u))||t&&"constructor"==i||o.push(i);return o}function L(n){var t,r=-1;if(h(n))return t=n.length,function(){return r++,t>r?{value:n[r],key:r}:null};var e=m(n);if(e)return function(){var n=e.next();return n.done?null:(r++,{value:n.value,key:r})};var o=A(n);return t=o.length,function(){r++;var e=o[r];return t>r?{value:n[e],key:e}:null}}function x(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function I(n){return function(t,r,e){e=p(e||s),t=t||[];var o=L(t);if(0>=n)return e(null);var u=!1,i=0,c=!1;!function a(){if(u&&0>=i)return e(null);for(;n>i&&!c;){var t=o();if(null===t)return u=!0,void(0>=i&&e(null));i+=1,r(t.value,t.key,x(function(n){i-=1,n?(e(n),c=!0):a()}))}}()}}function T(n){return function(t,r,e,o){return n(I(r),t,e,o)}}function M(n,t,r,e){e=p(e||s),t=t||[];var o=h(t)||m(t)?[]:{};n(t,function(n,t,e){r(n,function(n,r){o[t]=r,e(n)})},function(n){e(n,o)})}function $(n,t){return function(r,e,o){return n(r,t,e,o)}}function z(n){return f(function(t,e){var o;try{o=n.apply(this,t)}catch(u){return e(u)}r(o)&&"function"==typeof o.then?o.then(function(n){e(null,n)})["catch"](function(n){e(n.message?n:new Error(n))}):e(null,o)})}function F(n,t){for(var r=-1,e=n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function P(n){return function(t,r,e){for(var o=-1,u=Object(t),i=e(t),c=i.length;c--;){var a=i[n?c:++o];if(r(u[a],a,u)===!1)break}return t}}function D(n,t){return n&&$r(n,t,A)}function B(){this.__data__={array:[],map:null}}function U(n,t){return n===t||n!==n&&t!==t}function C(n,t){for(var r=n.length;r--;)if(U(n[r][0],t))return r;return-1}function q(n,t){var r=C(n,t);if(0>r)return!1;var e=n.length-1;return r==e?n.pop():Fr.call(n,r,1),!0}function R(n){var t=this.__data__,r=t.array;return r?q(r,n):t.map["delete"](n)}function W(n,t){var r=C(n,t);return 0>r?void 0:n[r][1]}function N(n){var t=this.__data__,r=t.array;return r?W(r,n):t.map.get(n)}function V(n,t){return C(n,t)>-1}function Q(n){var t=this.__data__,r=t.array;return r?V(r,n):t.map.has(n)}function G(n){var t=!1;if(null!=n&&"function"!=typeof n.toString)try{t=!!(n+"")}catch(r){}return t}function H(n){return null==n?!1:e(n)?qr.test(Ur.call(n)):o(n)&&(G(n)?qr:Dr).test(n)}function J(n,t){var r=n[t];return H(r)?r:void 0}function K(){}function X(n){return n&&n.Object===Object?n:null}function Y(){this.__data__={hash:new K,map:Yr?new Yr:[],string:new K}}function Z(n,t){return Rr?void 0!==n[t]:ne.call(n,t)}function nn(n,t){return Z(n,t)&&delete n[t]}function tn(n){var t=typeof n;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!=n||null==n}function rn(n){var t=this.__data__;return tn(n)?nn("string"==typeof n?t.string:t.hash,n):Yr?t.map["delete"](n):q(t.map,n)}function en(n,t){if(Rr){var r=n[t];return r===te?void 0:r}return ee.call(n,t)?n[t]:void 0}function on(n){var t=this.__data__;return tn(n)?en("string"==typeof n?t.string:t.hash,n):Yr?t.map.get(n):W(t.map,n)}function un(n){var t=this.__data__;return tn(n)?Z("string"==typeof n?t.string:t.hash,n):Yr?t.map.has(n):V(t.map,n)}function cn(n,t,r){var e=C(n,t);0>e?n.push([t,r]):n[e][1]=r}function an(n,t,r){n[t]=Rr&&void 0===r?oe:r}function fn(n,t){var r=this.__data__;return tn(n)?an("string"==typeof n?r.string:r.hash,n,t):Yr?r.map.set(n,t):cn(r.map,n,t),this}function ln(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function sn(n,t){var r=this.__data__,e=r.array;e&&(e.length<ue-1?cn(e,n,t):(r.array=null,r.map=new ln(e)));var o=r.map;return o&&o.set(n,t),this}function pn(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function yn(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function vn(n,t,r,e,o,u){var i=-1,c=o&ce,a=o&ie,f=n.length,l=t.length;if(f!=l&&!(c&&l>f))return!1;var s=u.get(n);if(s)return s==t;var p=!0;for(u.set(n,t);++i<f;){var y=n[i],v=t[i];if(e)var h=c?e(v,y,i,t,n,u):e(y,v,i,n,t,u);if(void 0!==h){if(h)continue;p=!1;break}if(a){if(!yn(t,function(n){return y===n||r(y,n,e,o,u)})){p=!1;break}}else if(y!==v&&!r(y,v,e,o,u)){p=!1;break}}return u["delete"](n),p}function hn(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function mn(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function dn(n,t,r,e,o,u,i){switch(r){case _e:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case we:return n.byteLength==t.byteLength&&e(new fe(n),new fe(t))?!0:!1;case pe:case ye:return+n==+t;case ve:return n.name==t.name&&n.message==t.message;case me:return n!=+n?t!=+t:n==+t;case de:case be:return n==t+"";case he:var c=hn;case ge:var a=u&se;if(c||(c=mn),n.size!=t.size&&!a)return!1;var f=i.get(n);return f?f==t:(u|=le,i.set(n,t),vn(c(n),c(t),e,o,u,i));case je:if(Se)return Se.call(n)==Se.call(t)}return!1}function gn(n,t,r,e,o,u){var i=o&ke,c=A(n),a=c.length,f=A(t),l=f.length;if(a!=l&&!i)return!1;for(var s=a;s--;){var p=c[s];if(!(i?p in t:g(t,p)))return!1}var y=u.get(n);if(y)return y==t;var v=!0;u.set(n,t);for(var h=i;++s<a;){p=c[s];var m=n[p],d=t[p];if(e)var b=i?e(d,m,p,t,n,u):e(m,d,p,n,t,u);if(!(void 0===b?m===d||r(m,d,e,o,u):b)){v=!1;break}h||(h="constructor"==p)}if(v&&!h){var j=n.constructor,w=t.constructor;j!=w&&"constructor"in n&&"constructor"in t&&!("function"==typeof j&&j instanceof j&&"function"==typeof w&&w instanceof w)&&(v=!1)}return u["delete"](n),v}function bn(n){return Be.call(n)}function jn(n){return o(n)&&v(n.length)&&!!ho[go.call(n)]}function wn(n,t,r,e,o,u){var i=jr(n),c=jr(t),a=wo,f=wo;i||(a=Ne(n),a=a==jo?_o:a),c||(f=Ne(t),f=f==jo?_o:f);var l=a==_o&&!G(n),s=f==_o&&!G(t),p=a==f;if(p&&!l)return u||(u=new pn),i||jn(n)?vn(n,t,r,e,o,u):dn(n,t,a,r,e,o,u);if(!(o&bo)){var y=l&&So.call(n,"__wrapped__"),v=s&&So.call(t,"__wrapped__");if(y||v){var h=y?n.value():n,m=v?t.value():t;return u||(u=new pn),r(h,m,e,o,u)}}return p?(u||(u=new pn),gn(n,t,r,e,o,u)):!1}function _n(n,t,e,u,i){return n===t?!0:null==n||null==t||!r(n)&&!o(t)?n!==n&&t!==t:wn(n,t,_n,e,u,i)}function On(n,t,r,e){var o=r.length,u=o,i=!e;if(null==n)return!u;for(n=Object(n);o--;){var c=r[o];if(i&&c[2]?c[1]!==n[c[0]]:!(c[0]in n))return!1}for(;++o<u;){c=r[o];var a=c[0],f=n[a],l=c[1];if(i&&c[2]){if(void 0===f&&!(a in n))return!1}else{var s=new pn;if(e)var p=e(f,l,a,n,t,s);if(!(void 0===p?_n(l,f,e,ko|Eo,s):p))return!1}}return!0}function Sn(n){return n===n&&!r(n)}function kn(n,t){for(var r=-1,e=n.length,o=Array(e);++r<e;)o[r]=t(n[r],r,n);return o}function En(n,t){return kn(t,function(t){return[t,n[t]]})}function An(n){return En(n,A(n))}function Ln(n){for(var t=An(n),r=t.length;r--;)t[r][2]=Sn(t[r][1]);return t}function xn(n){var t=Ln(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null==n?!1:n[r]===e&&(void 0!==e||r in Object(n))}}return function(r){return r===n||On(r,n,t)}}function In(n,t){if("function"!=typeof n||t&&"function"!=typeof t)throw new TypeError(Ao);var r=function(){var e=arguments,o=t?t.apply(this,e):e[0],u=r.cache;if(u.has(o))return u.get(o);var i=n.apply(this,e);return r.cache=u.set(o,i),i};return r.cache=new(In.Cache||ln),r}function Tn(n){if("string"==typeof n)return n;if(null==n)return"";if(u(n))return To?To.call(n):"";var t=n+"";return"0"==t&&1/n==-xo?"-0":t}function Mn(n){return jr(n)?n:zo(n)}function $n(n,t){var r=typeof n;return"number"==r||"symbol"==r?!0:!jr(n)&&(u(n)||Po.test(n)||!Fo.test(n)||null!=t&&n in Object(t))}function zn(n,t){t=$n(t,n)?[t]:Mn(t);for(var r=0,e=t.length;null!=n&&e>r;)n=n[t[r++]];return r&&r==e?n:void 0}function Fn(n,t,r){var e=null==n?void 0:zn(n,t);return void 0===e?r:e}function Pn(n,t){return t in Object(n)}function Dn(n,t,r){if(null==n)return!1;var e=r(n,t);if(!e&&!$n(t)){t=Mn(t);for(var o=-1,u=t.length;null!=n&&++o<u;){var i=t[o];if(!(e=r(n,i)))break;n=n[i]}}var u=n?n.length:void 0;return e||!!u&&v(u)&&k(t,u)&&(jr(n)||O(n)||_(n))}function Bn(n,t){return Dn(n,t,Pn)}function Un(n,t){return function(r){var e=Fn(r,n);return void 0===e&&e===t?Bn(r,n):_n(t,e,void 0,Do|Bo)}}function Cn(n){return n}function qn(n){return function(t){return zn(t,n)}}function Rn(n){return $n(n)?y(n):qn(n)}function Wn(n){return"function"==typeof n?n:null==n?Cn:"object"==typeof n?jr(n)?Un(n[0],n[1]):xn(n):Rn(n)}function Nn(n,t){return n&&D(n,Wn(t))}function Vn(n,t,r){for(var e=n.length,o=t+(r?0:-1);r?o--:++o<e;){var u=n[o];if(u!==u)return o}return-1}function Qn(n,t,r){if(t!==t)return Vn(n,r);for(var e=r-1,o=n.length;++e<o;)if(n[e]===t)return e;return-1}function Gn(n,t,r){function e(n,t){d.push(function(){c(n,t)})}function o(){if(0===d.length&&0===v)return r(null,y);for(;d.length&&t>v;){var n=d.shift();n()}}function u(n,t){var r=m[n];r||(r=m[n]=[]),r.push(t)}function i(n){var t=m[n]||[];F(t,function(n){n()}),o()}function c(n,t){if(!h){var e=x(a(function(t,e){if(v--,e.length<=1&&(e=e[0]),t){var o={};Nn(y,function(n,t){o[t]=n}),o[n]=e,h=!0,m=[],r(t,o)}else y[n]=e,i(n)}));v++;var o=t[t.length-1];t.length>1?o(y,e):o(e)}}"function"==typeof t&&(r=t,t=null),r=p(r||s);var f=A(n),l=f.length;if(!l)return r(null);t||(t=l);var y={},v=0,h=!1,m={},d=[];Nn(n,function(t,r){function o(){for(var t,e=i.length;e--;){if(!(t=n[i[e]]))throw new Error("async.auto task `"+r+"` has non-existent dependency in "+i.join(", "));if(jr(t)&&Qn(t,r,0)>=0)throw new Error("async.auto task `"+r+"`Has cyclic dependencies")}}if(!jr(t))return void e(r,[t]);var i=t.slice(0,t.length-1),c=i.length;o(),F(i,function(n){u(n,function(){c--,0===c&&e(r,t)})})}),o()}function Hn(n,t){var r=-1,e=n.length;for(t||(t=Array(e));++r<e;)t[r]=n[r];return t}function Jn(n){return n.toString().match(Uo)[1].split(/\s*\,\s*/)}function Kn(n,t){var r={};Nn(n,function(n,t){function e(t,r){var e=kn(o,function(n){return t[n]});e.push(r),n.apply(null,e)}var o;if(jr(n))o=Hn(n),n=o.pop(),r[t]=o.concat(e);else{if(0===n.length)throw new Error("autoInject task functions require explicit parameters.");1===n.length?r[t]=n:(o=Jn(n),o.pop(),r[t]=o.concat(e))}}),Gn(r,function(n,r){var e;jr(t)?(e=Hn(t),t=e.pop()):(e=Jn(t),e.shift()),e=kn(e,function(n){return r[n]}),e.unshift(n),t.apply(null,e)})}function Xn(n,t,r){function e(n,t,r,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");return n.started=!0,jr(t)||(t=[t]),0===t.length&&n.idle()?qo(function(){n.drain()}):(F(t,function(t){var o={data:t,callback:e||s};r?n.tasks.unshift(o):n.tasks.push(o)}),void qo(n.process))}function o(n,t){return function(){u-=1;var r=!1,e=arguments;F(t,function(n){F(i,function(t,e){t!==n||r||(i.splice(e,1),r=!0)}),n.callback.apply(n,e)}),u<=n.concurrency-n.buffer&&n.unsaturated(),n.tasks.length+u===0&&n.drain(),n.process()}}if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var u=0,i=[],c={tasks:[],concurrency:t,payload:r,saturated:s,unsaturated:s,buffer:t/4,empty:s,drain:s,started:!1,paused:!1,push:function(n,t){e(c,n,!1,t)},kill:function(){c.drain=s,c.tasks=[]},unshift:function(n,t){e(c,n,!0,t)},process:function(){for(;!c.paused&&u<c.concurrency&&c.tasks.length;){var t=c.payload?c.tasks.splice(0,c.payload):c.tasks.splice(0,c.tasks.length),r=kn(t,y("data"));0===c.tasks.length&&c.empty(),u+=1,i.push(t[0]),u===c.concurrency&&c.saturated();var e=x(o(c,t));n(r,e)}},length:function(){return c.tasks.length},running:function(){return u},workersList:function(){return i},idle:function(){return c.tasks.length+u===0},pause:function(){c.paused=!0},resume:function(){if(c.paused!==!1){c.paused=!1;for(var n=Math.min(c.concurrency,c.tasks.length),t=1;n>=t;t++)qo(c.process)}}};return c}function Yn(n,t){return Xn(n,1,t)}function Zn(n,t,r,e){I(t)(n,r,e)}function nt(n,t,r,e){Ro(n,function(n,e,o){r(t,n,function(n,r){t=r,o(n)})},function(n){e(n,t)})}function tt(){var n=arguments;return a(function(t){var r=this,e=t[t.length-1];"function"==typeof e?t.pop():e=s,nt(n,t,function(n,t,e){t.apply(r,n.concat([a(function(n,t){e(n,t)})]))},function(n,t){e.apply(r,[n].concat(t))})})}function rt(){return tt.apply(null,Wo.call(arguments))}function et(n,t,r,e){var o=[];n(t,function(n,t,e){r(n,function(n,t){o=o.concat(t||[]),e(n)})},function(n){e(n,o)})}function ot(n){return function(t,r,e){return n(No,t,r,e)}}function ut(n){return function(t,r,e){return n(Ro,t,r,e)}}function it(n,t,r){return function(e,o,u,i){function c(n){i&&(n?i(n):i(null,r(!1)))}function a(n,e,o){return i?void u(n,function(e,c){i&&(e?(i(e),i=u=!1):t(c)&&(i(null,r(!0,n)),i=u=!1)),o()}):o()}arguments.length>3?(i=i||s,n(e,o,a,c)):(i=u,i=i||s,u=o,n(e,a,c))}}function ct(n,t){return t}function at(n){return a(function(t,r){t.apply(null,r.concat([a(function(t,r){"object"==typeof console&&(t?console.error&&console.error(t):console[n]&&F(r,function(t){console[n](t)}))})]))})}function ft(n,t,r){r=r||s;var e=a(function(t,e){t?r(t):(e.push(o),n.apply(this,e))}),o=function(n,o){return n?r(n):o?void t(e):r(null)};n(o)}function lt(n,t,r){var e=0;ft(function(n){return e++<1?n(null,!0):void t.apply(this,arguments)},n,r)}function st(n,t,r){if(r=r||s,!n())return r(null);var e=a(function(o,u){return o?r(o):n.apply(this,u)?t(e):void r.apply(null,[null].concat(u))});t(e)}function pt(n,t,r){var e=0;return st(function(){return++e<=1||t.apply(this,arguments)},n,r)}function yt(n,t,r){return pt(n,function(){return!t.apply(this,arguments)},r)}function vt(n){return function(t,r,e){return n(t,e)}}function ht(n,t,r,e){return I(t)(n,vt(r),e)}function mt(n){return f(function(t,r){var e=!0;t.push(function(){var n=arguments;e?qo(function(){r.apply(null,n)}):r.apply(null,n)}),n.apply(this,t),e=!1})}function dt(n){return!n}function gt(n,t,r,e){var o=[];n(t,function(n,t,e){r(n,function(r,u){r?e(r):(u&&o.push({index:t,value:n}),e())})},function(n){n?e(n):e(null,kn(o.sort(function(n,t){return n.index-t.index}),y("value")))})}function bt(n,t){function r(n){return n?e(n):void o(r)}var e=x(t||s),o=mt(n);r()}function jt(n){function t(r){function e(){return n.length&&n[r].apply(null,arguments),e.next()}return e.next=function(){return r<n.length-1?t(r+1):null},e}return t(0)}function wt(n,t){return t in n}function _t(n,t){var r=Object.create(null),e=Object.create(null);t=t||Cn;var o=f(function(o,u){var i=t.apply(null,o);wt(r,i)?qo(function(){u.apply(null,r[i])}):wt(e,i)?e[i].push(u):(e[i]=[u],n.apply(null,o.concat([a(function(n){r[i]=n;var t=e[i];delete e[i];for(var o=0,u=t.length;u>o;o++)t[o].apply(null,n)})])))});return o.memo=r,o.unmemoized=n,o}function Ot(n,t,r){r=r||s;var e=h(t)?[]:{};n(t,function(n,t,r){n(a(function(n,o){o.length<=1&&(o=o[0]),e[t]=o,r(n)}))},function(n){r(n,e)})}function St(n,t,r){return Ot(I(t),n,r)}function kt(n,t){return Xn(function(t,r){n(t[0],r)},t,1)}function Et(n,t){function r(n,t){return n.priority-t.priority}function e(n,t,r){for(var e=-1,o=n.length-1;o>e;){var u=e+(o-e+1>>>1);r(t,n[u])>=0?e=u:o=u-1}return e}function o(n,t,o,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");return n.started=!0,jr(t)||(t=[t]),0===t.length?qo(function(){n.drain()}):void F(t,function(t){var i={data:t,priority:o,callback:"function"==typeof u?u:s};n.tasks.splice(e(n.tasks,i,r)+1,0,i),n.tasks.length===n.concurrency&&n.saturated(),n.tasks.length<=n.concurrency-n.buffer&&n.unsaturated(),qo(n.process)})}var u=kt(n,t);return u.push=function(n,t,r){o(u,n,t,r)},delete u.unshift,u}function At(n,t){return function(r,e){if(null==r)return r;if(!h(r))return n(r,e);for(var o=r.length,u=t?o:-1,i=Object(r);(t?u--:++u<o)&&e(i[u],u,i)!==!1;);return r}}function Lt(n,t){return"function"==typeof t&&jr(n)?F(n,t):au(n,Wn(t))}function xt(n,t){return t=p(t||s),jr(n)?n.length?void Lt(n,function(n){n(t)}):t():t(new TypeError("First argument to race must be an array of functions"))}function It(n,t,r,e){var o=fu.call(n).reverse();nt(o,t,r,e)}function Tt(n){return f(function(t,r){return t.push(a(function(n,t){if(n)r(null,{error:n});else{var e=null;1===t.length?e=t[0]:t.length>1&&(e=t),r(null,{value:e})}})),n.apply(this,t)})}function Mt(n,t,r,e){gt(n,t,function(n,t){r(n,function(n,r){n?t(n):t(null,!r)})},e)}function $t(n){return n.map(Tt)}function zt(n,t){return Ot(Ro,n,t)}function Ft(n,t,r){function e(n,t){if("object"==typeof t)n.times=+t.times||i,n.interval=+t.interval||c;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");n.times=+t||i}}function o(n){return function(r){t(function(t,e){r(!t||n,{err:t,result:e})})}}function u(n){return function(t){setTimeout(function(){t(null)},n)}}var i=5,c=0,a={times:i,interval:c};if(arguments.length<3&&"function"==typeof n?(r=t||s,t=n):(e(a,n),r=r||s),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");for(var f=[];a.times;){var l=!(a.times-=1);f.push(o(l)),!l&&a.interval>0&&f.push(u(a.interval))}zt(f,function(n,t){t=t[t.length-1],r(t.err,t.result)})}function Pt(n,t){return t||(t=n,n=null),f(function(r,e){function o(n){t.apply(null,r.concat([n]))}n?Ft(n,o,e):Ft(o,e)})}function Dt(n,t,r){function e(n,t){var r=n.criteria,e=t.criteria;return e>r?-1:r>e?1:0}Lr(n,function(n,r){t(n,function(t,e){return t?r(t):void r(null,{value:n,criteria:e})})},function(n,t){return n?r(n):void r(null,kn(t.sort(e),y("value")))})}function Bt(n,t,r){function e(){c||(u.apply(null,arguments),clearTimeout(i))}function o(){var t=n.name||"anonymous",e=new Error('Callback function "'+t+'" timed out.');e.code="ETIMEDOUT",r&&(e.info=r),c=!0,u(e)}var u,i,c=!1;return f(function(r,c){u=c,i=setTimeout(o,t),n.apply(null,r.concat(e))})}function Ut(n,t,r,e){for(var o=-1,u=du(mu((t-n)/(r||1)),0),i=Array(u);u--;)i[e?u:++o]=n,n+=r;return i}function Ct(n,t,r,e){return Ar(Ut(0,n,1),t,r,e)}function qt(n,t,r,e){3===arguments.length&&(e=r,r=t,t=jr(n)?[]:{}),No(n,function(n,e,o){r(t,n,e,o)},function(n){e(n,t)})}function Rt(n){return function(){return(n.unmemoized||n).apply(null,arguments)}}function Wt(n,t,r){return st(function(){return!n.apply(this,arguments)},t,r)}function Nt(n,t){function r(o){if(e===n.length)return t.apply(null,[null].concat(o));var u=x(a(function(n,e){return n?t.apply(null,[n].concat(e)):void r(e)}));o.push(u);var i=n[e++];i.apply(null,o)}if(t=p(t||s),!jr(n))return t(new Error("First argument to waterfall must be an array of functions"));if(!n.length)return t();var e=0;r([])}var Vt="[object Function]",Qt="[object GeneratorFunction]",Gt=Object.prototype,Ht=Gt.toString,Jt="[object Symbol]",Kt=Object.prototype,Xt=Kt.toString,Yt=NaN,Zt=/^\s+|\s+$/g,nr=/^[-+]0x[0-9a-f]+$/i,tr=/^0b[01]+$/i,rr=/^0o[0-7]+$/i,er=parseInt,or=1/0,ur=1.7976931348623157e308,ir="Expected a function",cr=Math.max,ar=y("length"),fr=9007199254740991,lr="function"==typeof Symbol&&Symbol.iterator,sr=Object.getPrototypeOf,pr=Object.prototype,yr=pr.hasOwnProperty,vr=Object.keys,hr="[object Arguments]",mr=Object.prototype,dr=mr.hasOwnProperty,gr=mr.toString,br=mr.propertyIsEnumerable,jr=Array.isArray,wr="[object String]",_r=Object.prototype,Or=_r.toString,Sr=9007199254740991,kr=/^(?:0|[1-9]\d*)$/,Er=Object.prototype,Ar=T(M),Lr=$(Ar,1/0),xr=l(Lr),Ir=$(Ar,1),Tr=l(Ir),Mr=a(function(n,t){return a(function(r){return n.apply(null,t.concat(r))})}),$r=P(),zr=Array.prototype,Fr=zr.splice,Pr=/[\\^$.*+?()[\]{}|]/g,Dr=/^\[object .+?Constructor\]$/,Br=Object.prototype,Ur=Function.prototype.toString,Cr=Br.hasOwnProperty,qr=RegExp("^"+Ur.call(Cr).replace(Pr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rr=J(Object,"create"),Wr=Object.prototype;K.prototype=Rr?Rr(null):Wr;var Nr={"function":!0,object:!0},Vr=Nr[typeof n]&&n&&!n.nodeType?n:void 0,Qr=Nr[typeof module]&&module&&!module.nodeType?module:void 0,Gr=X(Vr&&Qr&&"object"==typeof global&&global),Hr=X(Nr[typeof self]&&self),Jr=X(Nr[typeof window]&&window),Kr=X(Nr[typeof this]&&this),Xr=Gr||Jr!==(Kr&&Kr.window)&&Jr||Hr||Kr||Function("return this")(),Yr=J(Xr,"Map"),Zr=Object.prototype,ne=Zr.hasOwnProperty,te="__lodash_hash_undefined__",re=Object.prototype,ee=re.hasOwnProperty,oe="__lodash_hash_undefined__";ln.prototype.clear=Y,ln.prototype["delete"]=rn,ln.prototype.get=on,ln.prototype.has=un,ln.prototype.set=fn;var ue=200;pn.prototype.clear=B,pn.prototype["delete"]=R,pn.prototype.get=N,pn.prototype.has=Q,pn.prototype.set=sn;var ie=1,ce=2,ae=Xr.Symbol,fe=Xr.Uint8Array,le=1,se=2,pe="[object Boolean]",ye="[object Date]",ve="[object Error]",he="[object Map]",me="[object Number]",de="[object RegExp]",ge="[object Set]",be="[object String]",je="[object Symbol]",we="[object ArrayBuffer]",_e="[object DataView]",Oe=ae?ae.prototype:void 0,Se=Oe?Oe.valueOf:void 0,ke=2,Ee=J(Xr,"DataView"),Ae=J(Xr,"Promise"),Le=J(Xr,"Set"),xe=J(Xr,"WeakMap"),Ie="[object Map]",Te="[object Object]",Me="[object Promise]",$e="[object Set]",ze="[object WeakMap]",Fe="[object DataView]",Pe=Object.prototype,De=Function.prototype.toString,Be=Pe.toString,Ue=Ee?Ee+"":"",Ce=Yr?De.call(Yr):"",qe=Ae?De.call(Ae):"",Re=Le?De.call(Le):"",We=xe?De.call(xe):"";(Ee&&bn(new Ee(new ArrayBuffer(1)))!=Fe||Yr&&bn(new Yr)!=Ie||Ae&&bn(Ae.resolve())!=Me||Le&&bn(new Le)!=$e||xe&&bn(new xe)!=ze)&&(bn=function(n){var t=Be.call(n),r=t==Te?n.constructor:null,e="function"==typeof r?De.call(r):"";if(e)switch(e){case Ue:return Fe;case Ce:return Ie;case qe:return Me;case Re:return $e;case We:return ze}return t});var Ne=bn,Ve="[object Arguments]",Qe="[object Array]",Ge="[object Boolean]",He="[object Date]",Je="[object Error]",Ke="[object Function]",Xe="[object Map]",Ye="[object Number]",Ze="[object Object]",no="[object RegExp]",to="[object Set]",ro="[object String]",eo="[object WeakMap]",oo="[object ArrayBuffer]",uo="[object DataView]",io="[object Float32Array]",co="[object Float64Array]",ao="[object Int8Array]",fo="[object Int16Array]",lo="[object Int32Array]",so="[object Uint8Array]",po="[object Uint8ClampedArray]",yo="[object Uint16Array]",vo="[object Uint32Array]",ho={};ho[io]=ho[co]=ho[ao]=ho[fo]=ho[lo]=ho[so]=ho[po]=ho[yo]=ho[vo]=!0,ho[Ve]=ho[Qe]=ho[oo]=ho[Ge]=ho[uo]=ho[He]=ho[Je]=ho[Ke]=ho[Xe]=ho[Ye]=ho[Ze]=ho[no]=ho[to]=ho[ro]=ho[eo]=!1;var mo=Object.prototype,go=mo.toString,bo=2,jo="[object Arguments]",wo="[object Array]",_o="[object Object]",Oo=Object.prototype,So=Oo.hasOwnProperty,ko=1,Eo=2,Ao="Expected a function";In.Cache=ln;var Lo,xo=1/0,Io=ae?ae.prototype:void 0,To=Io?Io.toString:void 0,Mo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,$o=/\\(\\)?/g,zo=In(function(n){var t=[];return Tn(n).replace(Mo,function(n,r,e,o){t.push(e?o.replace($o,"$1"):r||n)}),t}),Fo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Po=/^\w*$/,Do=1,Bo=2,Uo=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Co="function"==typeof setImmediate&&setImmediate;Lo=Co?Co:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:function(n){setTimeout(n,0)};var qo=a(function(n,t){Lo(function(){n.apply(null,t)})}),Ro=$(Zn,1),Wo=Array.prototype.reverse,No=$(Zn,1/0),Vo=ot(et),Qo=ut(et),Go=a(function(n){var t=[null].concat(n);return f(function(n,r){return r.apply(this,t)})}),Ho=it(No,Cn,ct),Jo=it(Zn,Cn,ct),Ko=it(Ro,Cn,ct),Xo=at("dir"),Yo=$(ht,1/0),Zo=$(ht,1),nu=it(Zn,dt,dt),tu=$(nu,1/0),ru=$(nu,1),eu=T(gt),ou=$(eu,1/0),uu=$(eu,1),iu=at("log"),cu=$(St,1/0),au=At(D),fu=Array.prototype.slice,lu=T(Mt),su=$(lu,1/0),pu=$(lu,1),yu=it(Zn,Boolean,Cn),vu=$(yu,1/0),hu=$(yu,1),mu=Math.ceil,du=Math.max,gu=$(Ct,1/0),bu=$(Ct,1),ju={applyEach:xr,applyEachSeries:Tr,apply:Mr,asyncify:z,auto:Gn,autoInject:Kn,cargo:Yn,compose:rt,concat:Vo,concatSeries:Qo,constant:Go,detect:Ho,detectLimit:Jo,detectSeries:Ko,dir:Xo,doDuring:lt,doUntil:yt,doWhilst:pt,during:ft,each:Yo,eachLimit:ht,eachOf:No,eachOfLimit:Zn,eachOfSeries:Ro,eachSeries:Zo,ensureAsync:mt,every:tu,everyLimit:nu,everySeries:ru,filter:ou,filterLimit:eu,filterSeries:uu,forever:bt,iterator:jt,log:iu,map:Lr,mapLimit:Ar,mapSeries:Ir,memoize:_t,nextTick:qo,parallel:cu,parallelLimit:St,priorityQueue:Et,queue:kt,race:xt,reduce:nt,reduceRight:It,reflect:Tt,reflectAll:$t,reject:su,rejectLimit:lu,rejectSeries:pu,retry:Ft,retryable:Pt,seq:tt,series:zt,setImmediate:qo,some:vu,someLimit:yu,someSeries:hu,sortBy:Dt,timeout:Bt,times:gu,timesLimit:Ct,timesSeries:bu,transform:qt,unmemoize:Rt,until:Wt,waterfall:Nt,whilst:st,all:tu,any:vu,forEach:Yo,forEachSeries:Zo,forEachLimit:ht,forEachOf:No,forEachOfSeries:Ro,forEachOfLimit:Zn,inject:nt,foldl:nt,foldr:It,select:ou,selectLimit:eu,selectSeries:uu,wrapSync:z};n["default"]=ju,n.applyEach=xr,n.applyEachSeries=Tr,n.apply=Mr,n.asyncify=z,n.auto=Gn,n.autoInject=Kn,n.cargo=Yn,n.compose=rt,n.concat=Vo,n.concatSeries=Qo,n.constant=Go,n.detect=Ho,n.detectLimit=Jo,n.detectSeries=Ko,n.dir=Xo,n.doDuring=lt,n.doUntil=yt,n.doWhilst=pt,n.during=ft,n.each=Yo,n.eachLimit=ht,n.eachOf=No,n.eachOfLimit=Zn,n.eachOfSeries=Ro,n.eachSeries=Zo,n.ensureAsync=mt,n.every=tu,n.everyLimit=nu,n.everySeries=ru,n.filter=ou,n.filterLimit=eu,n.filterSeries=uu,n.forever=bt,n.iterator=jt,n.log=iu,n.map=Lr,n.mapLimit=Ar,n.mapSeries=Ir,n.memoize=_t,n.nextTick=qo,n.parallel=cu,n.parallelLimit=St,n.priorityQueue=Et,n.queue=kt,n.race=xt,n.reduce=nt,n.reduceRight=It,n.reflect=Tt,n.reflectAll=$t,n.reject=su,n.rejectLimit=lu,n.rejectSeries=pu,n.retry=Ft,n.retryable=Pt,n.seq=tt,n.series=zt,n.setImmediate=qo,n.some=vu,n.someLimit=yu,n.someSeries=hu,n.sortBy=Dt,n.timeout=Bt,n.times=gu,n.timesLimit=Ct,n.timesSeries=bu,n.transform=qt,n.unmemoize=Rt,n.until=Wt,n.waterfall=Nt,n.whilst=st,n.all=tu,n.allLimit=nu,n.allSeries=ru,n.any=vu,n.anyLimit=yu,n.anySeries=hu,n.find=Ho,n.findLimit=Jo,n.findSeries=Ko,n.forEach=Yo,n.forEachSeries=Zo,n.forEachLimit=ht,n.forEachOf=No,n.forEachOfSeries=Ro,n.forEachOfLimit=Zn,n.inject=nt,n.foldl=nt,n.foldr=It,n.select=ou,n.selectLimit=eu,n.selectSeries=uu,n.wrapSync=z}); -//# sourceMappingURL=dist/async.min.map
\ No newline at end of file +!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.async=n.async||{})}(this,function(n){"use strict";function t(n,t,r){var e=r.length;switch(e){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function r(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function e(n){var t=r(n)?Ht.call(n):"";return t==Vt||t==Qt}function o(n){return!!n&&"object"==typeof n}function u(n){return"symbol"==typeof n||o(n)&&Xt.call(n)==Jt}function i(n){if("number"==typeof n)return n;if(u(n))return Yt;if(r(n)){var t=e(n.valueOf)?n.valueOf():n;n=r(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(Zt,"");var o=tr.test(n);return o||rr.test(n)?er(n.slice(2),o?2:8):nr.test(n)?Yt:+n}function c(n){if(!n)return 0===n?n:0;if(n=i(n),n===or||n===-or){var t=0>n?-1:1;return t*ur}var r=n%1;return n===n?r?n-r:n:0}function a(n,r){if("function"!=typeof n)throw new TypeError(ir);return r=cr(void 0===r?n.length-1:c(r),0),function(){for(var e=arguments,o=-1,u=cr(e.length-r,0),i=Array(u);++o<u;)i[o]=e[r+o];switch(r){case 0:return n.call(this,i);case 1:return n.call(this,e[0],i);case 2:return n.call(this,e[0],e[1],i)}var c=Array(r+1);for(o=-1;++o<r;)c[o]=e[o];return c[r]=i,t(n,this,c)}}function f(n){return a(function(t){var r=t.pop();n.call(this,t,r)})}function l(n){return a(function(t,r){var e=f(function(r,e){var o=this;return n(t,function(n,t){n.apply(o,r.concat([t]))},e)});return r.length?e.apply(this,r):e})}function s(){}function p(n){return function(){if(null!==n){var t=n;n=null,t.apply(this,arguments)}}}function y(n){return function(t){return null==t?void 0:t[n]}}function v(n){return"number"==typeof n&&n>-1&&n%1==0&&fr>=n}function h(n){return null!=n&&v(ar(n))&&!e(n)}function m(n){return lr&&n[lr]&&n[lr]()}function d(n){return sr(Object(n))}function g(n,t){return yr.call(n,t)||"object"==typeof n&&t in n&&null===d(n)}function b(n){return vr(Object(n))}function j(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function w(n){return o(n)&&h(n)}function _(n){return w(n)&&dr.call(n,"callee")&&(!br.call(n,"callee")||gr.call(n)==hr)}function O(n){return"string"==typeof n||!jr(n)&&o(n)&&Or.call(n)==wr}function S(n){var t=n?n.length:void 0;return v(t)&&(jr(n)||O(n)||_(n))?j(t,String):null}function k(n,t){return n="number"==typeof n||kr.test(n)?+n:-1,t=null==t?Sr:t,n>-1&&n%1==0&&t>n}function E(n){var t=n&&n.constructor,r="function"==typeof t&&t.prototype||Er;return n===r}function A(n){var t=E(n);if(!t&&!h(n))return b(n);var r=S(n),e=!!r,o=r||[],u=o.length;for(var i in n)!g(n,i)||e&&("length"==i||k(i,u))||t&&"constructor"==i||o.push(i);return o}function L(n){var t,r=-1;if(h(n))return t=n.length,function(){return r++,t>r?{value:n[r],key:r}:null};var e=m(n);if(e)return function(){var n=e.next();return n.done?null:(r++,{value:n.value,key:r})};var o=A(n);return t=o.length,function(){r++;var e=o[r];return t>r?{value:n[e],key:e}:null}}function x(n){return function(){if(null===n)throw new Error("Callback was already called.");var t=n;n=null,t.apply(this,arguments)}}function I(n){return function(t,r,e){e=p(e||s),t=t||[];var o=L(t);if(0>=n)return e(null);var u=!1,i=0,c=!1;!function a(){if(u&&0>=i)return e(null);for(;n>i&&!c;){var t=o();if(null===t)return u=!0,void(0>=i&&e(null));i+=1,r(t.value,t.key,x(function(n){i-=1,n?(e(n),c=!0):a()}))}}()}}function T(n){return function(t,r,e,o){return n(I(r),t,e,o)}}function M(n,t,r,e){e=p(e||s),t=t||[];var o=h(t)||m(t)?[]:{};n(t,function(n,t,e){r(n,function(n,r){o[t]=r,e(n)})},function(n){e(n,o)})}function $(n,t){return function(r,e,o){return n(r,t,e,o)}}function z(n){return f(function(t,e){var o;try{o=n.apply(this,t)}catch(u){return e(u)}r(o)&&"function"==typeof o.then?o.then(function(n){e(null,n)})["catch"](function(n){e(n.message?n:new Error(n))}):e(null,o)})}function F(n,t){for(var r=-1,e=n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function P(n){return function(t,r,e){for(var o=-1,u=Object(t),i=e(t),c=i.length;c--;){var a=i[n?c:++o];if(r(u[a],a,u)===!1)break}return t}}function D(n,t){return n&&$r(n,t,A)}function B(){this.__data__={array:[],map:null}}function U(n,t){return n===t||n!==n&&t!==t}function C(n,t){for(var r=n.length;r--;)if(U(n[r][0],t))return r;return-1}function q(n,t){var r=C(n,t);if(0>r)return!1;var e=n.length-1;return r==e?n.pop():Fr.call(n,r,1),!0}function R(n){var t=this.__data__,r=t.array;return r?q(r,n):t.map["delete"](n)}function W(n,t){var r=C(n,t);return 0>r?void 0:n[r][1]}function N(n){var t=this.__data__,r=t.array;return r?W(r,n):t.map.get(n)}function V(n,t){return C(n,t)>-1}function Q(n){var t=this.__data__,r=t.array;return r?V(r,n):t.map.has(n)}function G(n){var t=!1;if(null!=n&&"function"!=typeof n.toString)try{t=!!(n+"")}catch(r){}return t}function H(n){return null==n?!1:e(n)?qr.test(Ur.call(n)):o(n)&&(G(n)?qr:Dr).test(n)}function J(n,t){var r=n[t];return H(r)?r:void 0}function K(){}function X(n){return n&&n.Object===Object?n:null}function Y(){this.__data__={hash:new K,map:Yr?new Yr:[],string:new K}}function Z(n,t){return Rr?void 0!==n[t]:ne.call(n,t)}function nn(n,t){return Z(n,t)&&delete n[t]}function tn(n){var t=typeof n;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!=n||null==n}function rn(n){var t=this.__data__;return tn(n)?nn("string"==typeof n?t.string:t.hash,n):Yr?t.map["delete"](n):q(t.map,n)}function en(n,t){if(Rr){var r=n[t];return r===te?void 0:r}return ee.call(n,t)?n[t]:void 0}function on(n){var t=this.__data__;return tn(n)?en("string"==typeof n?t.string:t.hash,n):Yr?t.map.get(n):W(t.map,n)}function un(n){var t=this.__data__;return tn(n)?Z("string"==typeof n?t.string:t.hash,n):Yr?t.map.has(n):V(t.map,n)}function cn(n,t,r){var e=C(n,t);0>e?n.push([t,r]):n[e][1]=r}function an(n,t,r){n[t]=Rr&&void 0===r?oe:r}function fn(n,t){var r=this.__data__;return tn(n)?an("string"==typeof n?r.string:r.hash,n,t):Yr?r.map.set(n,t):cn(r.map,n,t),this}function ln(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function sn(n,t){var r=this.__data__,e=r.array;e&&(e.length<ue-1?cn(e,n,t):(r.array=null,r.map=new ln(e)));var o=r.map;return o&&o.set(n,t),this}function pn(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function yn(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function vn(n,t,r,e,o,u){var i=-1,c=o&ce,a=o&ie,f=n.length,l=t.length;if(f!=l&&!(c&&l>f))return!1;var s=u.get(n);if(s)return s==t;var p=!0;for(u.set(n,t);++i<f;){var y=n[i],v=t[i];if(e)var h=c?e(v,y,i,t,n,u):e(y,v,i,n,t,u);if(void 0!==h){if(h)continue;p=!1;break}if(a){if(!yn(t,function(n){return y===n||r(y,n,e,o,u)})){p=!1;break}}else if(y!==v&&!r(y,v,e,o,u)){p=!1;break}}return u["delete"](n),p}function hn(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function mn(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function dn(n,t,r,e,o,u,i){switch(r){case _e:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case we:return n.byteLength==t.byteLength&&e(new fe(n),new fe(t))?!0:!1;case pe:case ye:return+n==+t;case ve:return n.name==t.name&&n.message==t.message;case me:return n!=+n?t!=+t:n==+t;case de:case be:return n==t+"";case he:var c=hn;case ge:var a=u&se;if(c||(c=mn),n.size!=t.size&&!a)return!1;var f=i.get(n);return f?f==t:(u|=le,i.set(n,t),vn(c(n),c(t),e,o,u,i));case je:if(Se)return Se.call(n)==Se.call(t)}return!1}function gn(n,t,r,e,o,u){var i=o&ke,c=A(n),a=c.length,f=A(t),l=f.length;if(a!=l&&!i)return!1;for(var s=a;s--;){var p=c[s];if(!(i?p in t:g(t,p)))return!1}var y=u.get(n);if(y)return y==t;var v=!0;u.set(n,t);for(var h=i;++s<a;){p=c[s];var m=n[p],d=t[p];if(e)var b=i?e(d,m,p,t,n,u):e(m,d,p,n,t,u);if(!(void 0===b?m===d||r(m,d,e,o,u):b)){v=!1;break}h||(h="constructor"==p)}if(v&&!h){var j=n.constructor,w=t.constructor;j!=w&&"constructor"in n&&"constructor"in t&&!("function"==typeof j&&j instanceof j&&"function"==typeof w&&w instanceof w)&&(v=!1)}return u["delete"](n),v}function bn(n){return Be.call(n)}function jn(n){return o(n)&&v(n.length)&&!!ho[go.call(n)]}function wn(n,t,r,e,o,u){var i=jr(n),c=jr(t),a=wo,f=wo;i||(a=Ne(n),a=a==jo?_o:a),c||(f=Ne(t),f=f==jo?_o:f);var l=a==_o&&!G(n),s=f==_o&&!G(t),p=a==f;if(p&&!l)return u||(u=new pn),i||jn(n)?vn(n,t,r,e,o,u):dn(n,t,a,r,e,o,u);if(!(o&bo)){var y=l&&So.call(n,"__wrapped__"),v=s&&So.call(t,"__wrapped__");if(y||v){var h=y?n.value():n,m=v?t.value():t;return u||(u=new pn),r(h,m,e,o,u)}}return p?(u||(u=new pn),gn(n,t,r,e,o,u)):!1}function _n(n,t,e,u,i){return n===t?!0:null==n||null==t||!r(n)&&!o(t)?n!==n&&t!==t:wn(n,t,_n,e,u,i)}function On(n,t,r,e){var o=r.length,u=o,i=!e;if(null==n)return!u;for(n=Object(n);o--;){var c=r[o];if(i&&c[2]?c[1]!==n[c[0]]:!(c[0]in n))return!1}for(;++o<u;){c=r[o];var a=c[0],f=n[a],l=c[1];if(i&&c[2]){if(void 0===f&&!(a in n))return!1}else{var s=new pn;if(e)var p=e(f,l,a,n,t,s);if(!(void 0===p?_n(l,f,e,ko|Eo,s):p))return!1}}return!0}function Sn(n){return n===n&&!r(n)}function kn(n,t){for(var r=-1,e=n.length,o=Array(e);++r<e;)o[r]=t(n[r],r,n);return o}function En(n,t){return kn(t,function(t){return[t,n[t]]})}function An(n){return En(n,A(n))}function Ln(n){for(var t=An(n),r=t.length;r--;)t[r][2]=Sn(t[r][1]);return t}function xn(n){var t=Ln(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null==n?!1:n[r]===e&&(void 0!==e||r in Object(n))}}return function(r){return r===n||On(r,n,t)}}function In(n,t){if("function"!=typeof n||t&&"function"!=typeof t)throw new TypeError(Ao);var r=function(){var e=arguments,o=t?t.apply(this,e):e[0],u=r.cache;if(u.has(o))return u.get(o);var i=n.apply(this,e);return r.cache=u.set(o,i),i};return r.cache=new(In.Cache||ln),r}function Tn(n){if("string"==typeof n)return n;if(null==n)return"";if(u(n))return To?To.call(n):"";var t=n+"";return"0"==t&&1/n==-xo?"-0":t}function Mn(n){return jr(n)?n:zo(n)}function $n(n,t){var r=typeof n;return"number"==r||"symbol"==r?!0:!jr(n)&&(u(n)||Po.test(n)||!Fo.test(n)||null!=t&&n in Object(t))}function zn(n,t){t=$n(t,n)?[t]:Mn(t);for(var r=0,e=t.length;null!=n&&e>r;)n=n[t[r++]];return r&&r==e?n:void 0}function Fn(n,t,r){var e=null==n?void 0:zn(n,t);return void 0===e?r:e}function Pn(n,t){return t in Object(n)}function Dn(n,t,r){if(null==n)return!1;var e=r(n,t);if(!e&&!$n(t)){t=Mn(t);for(var o=-1,u=t.length;null!=n&&++o<u;){var i=t[o];if(!(e=r(n,i)))break;n=n[i]}}var u=n?n.length:void 0;return e||!!u&&v(u)&&k(t,u)&&(jr(n)||O(n)||_(n))}function Bn(n,t){return Dn(n,t,Pn)}function Un(n,t){return function(r){var e=Fn(r,n);return void 0===e&&e===t?Bn(r,n):_n(t,e,void 0,Do|Bo)}}function Cn(n){return n}function qn(n){return function(t){return zn(t,n)}}function Rn(n){return $n(n)?y(n):qn(n)}function Wn(n){return"function"==typeof n?n:null==n?Cn:"object"==typeof n?jr(n)?Un(n[0],n[1]):xn(n):Rn(n)}function Nn(n,t){return n&&D(n,Wn(t))}function Vn(n,t,r){for(var e=n.length,o=t+(r?0:-1);r?o--:++o<e;){var u=n[o];if(u!==u)return o}return-1}function Qn(n,t,r){if(t!==t)return Vn(n,r);for(var e=r-1,o=n.length;++e<o;)if(n[e]===t)return e;return-1}function Gn(n,t,r){function e(n,t){b.push(function(){c(n,t)})}function o(){if(0===b.length&&0===m)return r(null,h);for(;b.length&&t>m;){var n=b.shift();n()}}function u(n,t){var r=g[n];r||(r=g[n]=[]),r.push(t)}function i(n){var t=g[n]||[];F(t,function(n){n()}),o()}function c(n,t){if(!d){var e=x(a(function(t,e){if(m--,e.length<=1&&(e=e[0]),t){var o={};Nn(h,function(n,t){o[t]=n}),o[n]=e,d=!0,g=[],r(t,o)}else h[n]=e,i(n)}));m++;var o=t[t.length-1];t.length>1?o(h,e):o(e)}}function f(){for(var n,t=0;j.length;)n=j.pop(),t++,F(l(n),function(n){--w[n]||j.push(n)});if(t!==v)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function l(t){var r=[];return Nn(n,function(n,e){jr(n)&&Qn(n,t,0)>=0&&r.push(e)}),r}"function"==typeof t&&(r=t,t=null),r=p(r||s);var y=A(n),v=y.length;if(!v)return r(null);t||(t=v);var h={},m=0,d=!1,g={},b=[],j=[],w={};Nn(n,function(t,r){if(!jr(t))return e(r,[t]),void j.push(r);var o=t.slice(0,t.length-1),i=o.length;i||(e(r,[t]),j.push(r)),w[r]=i,F(o,function(c){if(!n[c])throw new Error("async.auto task `"+r+"` has a non-existent dependency in "+o.join(", "));u(c,function(){i--,0===i&&e(r,t)})})}),f(),o()}function Hn(n,t){var r=-1,e=n.length;for(t||(t=Array(e));++r<e;)t[r]=n[r];return t}function Jn(n){return n.toString().match(Uo)[1].split(/\s*\,\s*/)}function Kn(n,t){var r={};Nn(n,function(n,t){function e(t,r){var e=kn(o,function(n){return t[n]});e.push(r),n.apply(null,e)}var o;if(jr(n))o=Hn(n),n=o.pop(),r[t]=o.concat(e);else{if(0===n.length)throw new Error("autoInject task functions require explicit parameters.");1===n.length?r[t]=n:(o=Jn(n),o.pop(),r[t]=o.concat(e))}}),Gn(r,t)}function Xn(n,t,r){function e(n,t,r,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");return n.started=!0,jr(t)||(t=[t]),0===t.length&&n.idle()?qo(function(){n.drain()}):(F(t,function(t){var o={data:t,callback:e||s};r?n.tasks.unshift(o):n.tasks.push(o)}),void qo(n.process))}function o(n,t){return function(){u-=1;var r=!1,e=arguments;F(t,function(n){F(i,function(t,e){t!==n||r||(i.splice(e,1),r=!0)}),n.callback.apply(n,e)}),u<=n.concurrency-n.buffer&&n.unsaturated(),n.tasks.length+u===0&&n.drain(),n.process()}}if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var u=0,i=[],c={tasks:[],concurrency:t,payload:r,saturated:s,unsaturated:s,buffer:t/4,empty:s,drain:s,started:!1,paused:!1,push:function(n,t){e(c,n,!1,t)},kill:function(){c.drain=s,c.tasks=[]},unshift:function(n,t){e(c,n,!0,t)},process:function(){for(;!c.paused&&u<c.concurrency&&c.tasks.length;){var t=c.payload?c.tasks.splice(0,c.payload):c.tasks.splice(0,c.tasks.length),r=kn(t,y("data"));0===c.tasks.length&&c.empty(),u+=1,i.push(t[0]),u===c.concurrency&&c.saturated();var e=x(o(c,t));n(r,e)}},length:function(){return c.tasks.length},running:function(){return u},workersList:function(){return i},idle:function(){return c.tasks.length+u===0},pause:function(){c.paused=!0},resume:function(){if(c.paused!==!1){c.paused=!1;for(var n=Math.min(c.concurrency,c.tasks.length),t=1;n>=t;t++)qo(c.process)}}};return c}function Yn(n,t){return Xn(n,1,t)}function Zn(n,t,r,e){I(t)(n,r,e)}function nt(n,t,r,e){Ro(n,function(n,e,o){r(t,n,function(n,r){t=r,o(n)})},function(n){e(n,t)})}function tt(){var n=arguments;return a(function(t){var r=this,e=t[t.length-1];"function"==typeof e?t.pop():e=s,nt(n,t,function(n,t,e){t.apply(r,n.concat([a(function(n,t){e(n,t)})]))},function(n,t){e.apply(r,[n].concat(t))})})}function rt(){return tt.apply(null,Wo.call(arguments))}function et(n,t,r,e){var o=[];n(t,function(n,t,e){r(n,function(n,t){o=o.concat(t||[]),e(n)})},function(n){e(n,o)})}function ot(n){return function(t,r,e){return n(No,t,r,e)}}function ut(n){return function(t,r,e){return n(Ro,t,r,e)}}function it(n,t,r){return function(e,o,u,i){function c(n){i&&(n?i(n):i(null,r(!1)))}function a(n,e,o){return i?void u(n,function(e,c){i&&(e?(i(e),i=u=!1):t(c)&&(i(null,r(!0,n)),i=u=!1)),o()}):o()}arguments.length>3?(i=i||s,n(e,o,a,c)):(i=u,i=i||s,u=o,n(e,a,c))}}function ct(n,t){return t}function at(n){return a(function(t,r){t.apply(null,r.concat([a(function(t,r){"object"==typeof console&&(t?console.error&&console.error(t):console[n]&&F(r,function(t){console[n](t)}))})]))})}function ft(n,t,r){r=r||s;var e=a(function(t,e){t?r(t):(e.push(o),n.apply(this,e))}),o=function(n,o){return n?r(n):o?void t(e):r(null)};n(o)}function lt(n,t,r){var e=0;ft(function(n){return e++<1?n(null,!0):void t.apply(this,arguments)},n,r)}function st(n,t,r){if(r=r||s,!n())return r(null);var e=a(function(o,u){return o?r(o):n.apply(this,u)?t(e):void r.apply(null,[null].concat(u))});t(e)}function pt(n,t,r){var e=0;return st(function(){return++e<=1||t.apply(this,arguments)},n,r)}function yt(n,t,r){return pt(n,function(){return!t.apply(this,arguments)},r)}function vt(n){return function(t,r,e){return n(t,e)}}function ht(n,t,r,e){return I(t)(n,vt(r),e)}function mt(n){return f(function(t,r){var e=!0;t.push(function(){var n=arguments;e?qo(function(){r.apply(null,n)}):r.apply(null,n)}),n.apply(this,t),e=!1})}function dt(n){return!n}function gt(n,t,r,e){var o=[];n(t,function(n,t,e){r(n,function(r,u){r?e(r):(u&&o.push({index:t,value:n}),e())})},function(n){n?e(n):e(null,kn(o.sort(function(n,t){return n.index-t.index}),y("value")))})}function bt(n,t){function r(n){return n?e(n):void o(r)}var e=x(t||s),o=mt(n);r()}function jt(n){function t(r){function e(){return n.length&&n[r].apply(null,arguments),e.next()}return e.next=function(){return r<n.length-1?t(r+1):null},e}return t(0)}function wt(n,t){return t in n}function _t(n,t){var r=Object.create(null),e=Object.create(null);t=t||Cn;var o=f(function(o,u){var i=t.apply(null,o);wt(r,i)?qo(function(){u.apply(null,r[i])}):wt(e,i)?e[i].push(u):(e[i]=[u],n.apply(null,o.concat([a(function(n){r[i]=n;var t=e[i];delete e[i];for(var o=0,u=t.length;u>o;o++)t[o].apply(null,n)})])))});return o.memo=r,o.unmemoized=n,o}function Ot(n,t,r){r=r||s;var e=h(t)?[]:{};n(t,function(n,t,r){n(a(function(n,o){o.length<=1&&(o=o[0]),e[t]=o,r(n)}))},function(n){r(n,e)})}function St(n,t,r){return Ot(I(t),n,r)}function kt(n,t){return Xn(function(t,r){n(t[0],r)},t,1)}function Et(n,t){function r(n,t){return n.priority-t.priority}function e(n,t,r){for(var e=-1,o=n.length-1;o>e;){var u=e+(o-e+1>>>1);r(t,n[u])>=0?e=u:o=u-1}return e}function o(n,t,o,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");return n.started=!0,jr(t)||(t=[t]),0===t.length?qo(function(){n.drain()}):void F(t,function(t){var i={data:t,priority:o,callback:"function"==typeof u?u:s};n.tasks.splice(e(n.tasks,i,r)+1,0,i),qo(n.process)})}var u=kt(n,t);return u.push=function(n,t,r){o(u,n,t,r)},delete u.unshift,u}function At(n,t){return function(r,e){if(null==r)return r;if(!h(r))return n(r,e);for(var o=r.length,u=t?o:-1,i=Object(r);(t?u--:++u<o)&&e(i[u],u,i)!==!1;);return r}}function Lt(n,t){return"function"==typeof t&&jr(n)?F(n,t):au(n,Wn(t))}function xt(n,t){return t=p(t||s),jr(n)?n.length?void Lt(n,function(n){n(t)}):t():t(new TypeError("First argument to race must be an array of functions"))}function It(n,t,r,e){var o=fu.call(n).reverse();nt(o,t,r,e)}function Tt(n){return f(function(t,r){return t.push(a(function(n,t){if(n)r(null,{error:n});else{var e=null;1===t.length?e=t[0]:t.length>1&&(e=t),r(null,{value:e})}})),n.apply(this,t)})}function Mt(n,t,r,e){gt(n,t,function(n,t){r(n,function(n,r){n?t(n):t(null,!r)})},e)}function $t(n){return n.map(Tt)}function zt(n,t){return Ot(Ro,n,t)}function Ft(n,t,r){function e(n,t){if("object"==typeof t)n.times=+t.times||i,n.interval=+t.interval||c;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");n.times=+t||i}}function o(n){return function(r){t(function(t,e){r(!t||n,{err:t,result:e})})}}function u(n){return function(t){setTimeout(function(){t(null)},n)}}var i=5,c=0,a={times:i,interval:c};if(arguments.length<3&&"function"==typeof n?(r=t||s,t=n):(e(a,n),r=r||s),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");for(var f=[];a.times;){var l=!(a.times-=1);f.push(o(l)),!l&&a.interval>0&&f.push(u(a.interval))}zt(f,function(n,t){t=t[t.length-1],r(t.err,t.result)})}function Pt(n,t){return t||(t=n,n=null),f(function(r,e){function o(n){t.apply(null,r.concat([n]))}n?Ft(n,o,e):Ft(o,e)})}function Dt(n,t,r){function e(n,t){var r=n.criteria,e=t.criteria;return e>r?-1:r>e?1:0}Lr(n,function(n,r){t(n,function(t,e){return t?r(t):void r(null,{value:n,criteria:e})})},function(n,t){return n?r(n):void r(null,kn(t.sort(e),y("value")))})}function Bt(n,t,r){function e(){c||(u.apply(null,arguments),clearTimeout(i))}function o(){var t=n.name||"anonymous",e=new Error('Callback function "'+t+'" timed out.');e.code="ETIMEDOUT",r&&(e.info=r),c=!0,u(e)}var u,i,c=!1;return f(function(r,c){u=c,i=setTimeout(o,t),n.apply(null,r.concat(e))})}function Ut(n,t,r,e){for(var o=-1,u=du(mu((t-n)/(r||1)),0),i=Array(u);u--;)i[e?u:++o]=n,n+=r;return i}function Ct(n,t,r,e){return Ar(Ut(0,n,1),t,r,e)}function qt(n,t,r,e){3===arguments.length&&(e=r,r=t,t=jr(n)?[]:{}),No(n,function(n,e,o){r(t,n,e,o)},function(n){e(n,t)})}function Rt(n){return function(){return(n.unmemoized||n).apply(null,arguments)}}function Wt(n,t,r){return st(function(){return!n.apply(this,arguments)},t,r)}function Nt(n,t){function r(o){if(e===n.length)return t.apply(null,[null].concat(o));var u=x(a(function(n,e){return n?t.apply(null,[n].concat(e)):void r(e)}));o.push(u);var i=n[e++];i.apply(null,o)}if(t=p(t||s),!jr(n))return t(new Error("First argument to waterfall must be an array of functions"));if(!n.length)return t();var e=0;r([])}var Vt="[object Function]",Qt="[object GeneratorFunction]",Gt=Object.prototype,Ht=Gt.toString,Jt="[object Symbol]",Kt=Object.prototype,Xt=Kt.toString,Yt=NaN,Zt=/^\s+|\s+$/g,nr=/^[-+]0x[0-9a-f]+$/i,tr=/^0b[01]+$/i,rr=/^0o[0-7]+$/i,er=parseInt,or=1/0,ur=1.7976931348623157e308,ir="Expected a function",cr=Math.max,ar=y("length"),fr=9007199254740991,lr="function"==typeof Symbol&&Symbol.iterator,sr=Object.getPrototypeOf,pr=Object.prototype,yr=pr.hasOwnProperty,vr=Object.keys,hr="[object Arguments]",mr=Object.prototype,dr=mr.hasOwnProperty,gr=mr.toString,br=mr.propertyIsEnumerable,jr=Array.isArray,wr="[object String]",_r=Object.prototype,Or=_r.toString,Sr=9007199254740991,kr=/^(?:0|[1-9]\d*)$/,Er=Object.prototype,Ar=T(M),Lr=$(Ar,1/0),xr=l(Lr),Ir=$(Ar,1),Tr=l(Ir),Mr=a(function(n,t){return a(function(r){return n.apply(null,t.concat(r))})}),$r=P(),zr=Array.prototype,Fr=zr.splice,Pr=/[\\^$.*+?()[\]{}|]/g,Dr=/^\[object .+?Constructor\]$/,Br=Object.prototype,Ur=Function.prototype.toString,Cr=Br.hasOwnProperty,qr=RegExp("^"+Ur.call(Cr).replace(Pr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rr=J(Object,"create"),Wr=Object.prototype;K.prototype=Rr?Rr(null):Wr;var Nr={"function":!0,object:!0},Vr=Nr[typeof n]&&n&&!n.nodeType?n:void 0,Qr=Nr[typeof module]&&module&&!module.nodeType?module:void 0,Gr=X(Vr&&Qr&&"object"==typeof global&&global),Hr=X(Nr[typeof self]&&self),Jr=X(Nr[typeof window]&&window),Kr=X(Nr[typeof this]&&this),Xr=Gr||Jr!==(Kr&&Kr.window)&&Jr||Hr||Kr||Function("return this")(),Yr=J(Xr,"Map"),Zr=Object.prototype,ne=Zr.hasOwnProperty,te="__lodash_hash_undefined__",re=Object.prototype,ee=re.hasOwnProperty,oe="__lodash_hash_undefined__";ln.prototype.clear=Y,ln.prototype["delete"]=rn,ln.prototype.get=on,ln.prototype.has=un,ln.prototype.set=fn;var ue=200;pn.prototype.clear=B,pn.prototype["delete"]=R,pn.prototype.get=N,pn.prototype.has=Q,pn.prototype.set=sn;var ie=1,ce=2,ae=Xr.Symbol,fe=Xr.Uint8Array,le=1,se=2,pe="[object Boolean]",ye="[object Date]",ve="[object Error]",he="[object Map]",me="[object Number]",de="[object RegExp]",ge="[object Set]",be="[object String]",je="[object Symbol]",we="[object ArrayBuffer]",_e="[object DataView]",Oe=ae?ae.prototype:void 0,Se=Oe?Oe.valueOf:void 0,ke=2,Ee=J(Xr,"DataView"),Ae=J(Xr,"Promise"),Le=J(Xr,"Set"),xe=J(Xr,"WeakMap"),Ie="[object Map]",Te="[object Object]",Me="[object Promise]",$e="[object Set]",ze="[object WeakMap]",Fe="[object DataView]",Pe=Object.prototype,De=Function.prototype.toString,Be=Pe.toString,Ue=Ee?Ee+"":"",Ce=Yr?De.call(Yr):"",qe=Ae?De.call(Ae):"",Re=Le?De.call(Le):"",We=xe?De.call(xe):"";(Ee&&bn(new Ee(new ArrayBuffer(1)))!=Fe||Yr&&bn(new Yr)!=Ie||Ae&&bn(Ae.resolve())!=Me||Le&&bn(new Le)!=$e||xe&&bn(new xe)!=ze)&&(bn=function(n){var t=Be.call(n),r=t==Te?n.constructor:null,e="function"==typeof r?De.call(r):"";if(e)switch(e){case Ue:return Fe;case Ce:return Ie;case qe:return Me;case Re:return $e;case We:return ze}return t});var Ne=bn,Ve="[object Arguments]",Qe="[object Array]",Ge="[object Boolean]",He="[object Date]",Je="[object Error]",Ke="[object Function]",Xe="[object Map]",Ye="[object Number]",Ze="[object Object]",no="[object RegExp]",to="[object Set]",ro="[object String]",eo="[object WeakMap]",oo="[object ArrayBuffer]",uo="[object DataView]",io="[object Float32Array]",co="[object Float64Array]",ao="[object Int8Array]",fo="[object Int16Array]",lo="[object Int32Array]",so="[object Uint8Array]",po="[object Uint8ClampedArray]",yo="[object Uint16Array]",vo="[object Uint32Array]",ho={};ho[io]=ho[co]=ho[ao]=ho[fo]=ho[lo]=ho[so]=ho[po]=ho[yo]=ho[vo]=!0,ho[Ve]=ho[Qe]=ho[oo]=ho[Ge]=ho[uo]=ho[He]=ho[Je]=ho[Ke]=ho[Xe]=ho[Ye]=ho[Ze]=ho[no]=ho[to]=ho[ro]=ho[eo]=!1;var mo=Object.prototype,go=mo.toString,bo=2,jo="[object Arguments]",wo="[object Array]",_o="[object Object]",Oo=Object.prototype,So=Oo.hasOwnProperty,ko=1,Eo=2,Ao="Expected a function";In.Cache=ln;var Lo,xo=1/0,Io=ae?ae.prototype:void 0,To=Io?Io.toString:void 0,Mo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,$o=/\\(\\)?/g,zo=In(function(n){var t=[];return Tn(n).replace(Mo,function(n,r,e,o){t.push(e?o.replace($o,"$1"):r||n)}),t}),Fo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Po=/^\w*$/,Do=1,Bo=2,Uo=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Co="function"==typeof setImmediate&&setImmediate;Lo=Co?Co:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:function(n){setTimeout(n,0)};var qo=a(function(n,t){Lo(function(){n.apply(null,t)})}),Ro=$(Zn,1),Wo=Array.prototype.reverse,No=$(Zn,1/0),Vo=ot(et),Qo=ut(et),Go=a(function(n){var t=[null].concat(n);return f(function(n,r){return r.apply(this,t)})}),Ho=it(No,Cn,ct),Jo=it(Zn,Cn,ct),Ko=it(Ro,Cn,ct),Xo=at("dir"),Yo=$(ht,1/0),Zo=$(ht,1),nu=it(Zn,dt,dt),tu=$(nu,1/0),ru=$(nu,1),eu=T(gt),ou=$(eu,1/0),uu=$(eu,1),iu=at("log"),cu=$(St,1/0),au=At(D),fu=Array.prototype.slice,lu=T(Mt),su=$(lu,1/0),pu=$(lu,1),yu=it(Zn,Boolean,Cn),vu=$(yu,1/0),hu=$(yu,1),mu=Math.ceil,du=Math.max,gu=$(Ct,1/0),bu=$(Ct,1),ju={applyEach:xr,applyEachSeries:Tr,apply:Mr,asyncify:z,auto:Gn,autoInject:Kn,cargo:Yn,compose:rt,concat:Vo,concatSeries:Qo,constant:Go,detect:Ho,detectLimit:Jo,detectSeries:Ko,dir:Xo,doDuring:lt,doUntil:yt,doWhilst:pt,during:ft,each:Yo,eachLimit:ht,eachOf:No,eachOfLimit:Zn,eachOfSeries:Ro,eachSeries:Zo,ensureAsync:mt,every:tu,everyLimit:nu,everySeries:ru,filter:ou,filterLimit:eu,filterSeries:uu,forever:bt,iterator:jt,log:iu,map:Lr,mapLimit:Ar,mapSeries:Ir,memoize:_t,nextTick:qo,parallel:cu,parallelLimit:St,priorityQueue:Et,queue:kt,race:xt,reduce:nt,reduceRight:It,reflect:Tt,reflectAll:$t,reject:su,rejectLimit:lu,rejectSeries:pu,retry:Ft,retryable:Pt,seq:tt,series:zt,setImmediate:qo,some:vu,someLimit:yu,someSeries:hu,sortBy:Dt,timeout:Bt,times:gu,timesLimit:Ct,timesSeries:bu,transform:qt,unmemoize:Rt,until:Wt,waterfall:Nt,whilst:st,all:tu,any:vu,forEach:Yo,forEachSeries:Zo,forEachLimit:ht,forEachOf:No,forEachOfSeries:Ro,forEachOfLimit:Zn,inject:nt,foldl:nt,foldr:It,select:ou,selectLimit:eu,selectSeries:uu,wrapSync:z};n["default"]=ju,n.applyEach=xr,n.applyEachSeries=Tr,n.apply=Mr,n.asyncify=z,n.auto=Gn,n.autoInject=Kn,n.cargo=Yn,n.compose=rt,n.concat=Vo,n.concatSeries=Qo,n.constant=Go,n.detect=Ho,n.detectLimit=Jo,n.detectSeries=Ko,n.dir=Xo,n.doDuring=lt,n.doUntil=yt,n.doWhilst=pt,n.during=ft,n.each=Yo,n.eachLimit=ht,n.eachOf=No,n.eachOfLimit=Zn,n.eachOfSeries=Ro,n.eachSeries=Zo,n.ensureAsync=mt,n.every=tu,n.everyLimit=nu,n.everySeries=ru,n.filter=ou,n.filterLimit=eu,n.filterSeries=uu,n.forever=bt,n.iterator=jt,n.log=iu,n.map=Lr,n.mapLimit=Ar,n.mapSeries=Ir,n.memoize=_t,n.nextTick=qo,n.parallel=cu,n.parallelLimit=St,n.priorityQueue=Et,n.queue=kt,n.race=xt,n.reduce=nt,n.reduceRight=It,n.reflect=Tt,n.reflectAll=$t,n.reject=su,n.rejectLimit=lu,n.rejectSeries=pu,n.retry=Ft,n.retryable=Pt,n.seq=tt,n.series=zt,n.setImmediate=qo,n.some=vu,n.someLimit=yu,n.someSeries=hu,n.sortBy=Dt,n.timeout=Bt,n.times=gu,n.timesLimit=Ct,n.timesSeries=bu,n.transform=qt,n.unmemoize=Rt,n.until=Wt,n.waterfall=Nt,n.whilst=st,n.all=tu,n.allLimit=nu,n.allSeries=ru,n.any=vu,n.anyLimit=yu,n.anySeries=hu,n.find=Ho,n.findLimit=Jo,n.findSeries=Ko,n.forEach=Yo,n.forEachSeries=Zo,n.forEachLimit=ht,n.forEachOf=No,n.forEachOfSeries=Ro,n.forEachOfLimit=Zn,n.inject=nt,n.foldl=nt,n.foldr=It,n.select=ou,n.selectLimit=eu,n.selectSeries=uu,n.wrapSync=z}); +//# sourceMappingURL=async.min.map
\ No newline at end of file diff --git a/dist/async.min.map b/dist/async.min.map index c2e73cd..99f6924 100644 --- a/dist/async.min.map +++ b/dist/async.min.map @@ -1 +1 @@ -{"version":3,"file":"build/dist/async.min.js","sources":["build/dist/async.js"],"names":["global","factory","exports","module","define","amd","async","this","apply","func","thisArg","args","length","call","isObject","value","type","isFunction","tag","objectToString","funcTag","genTag","isObjectLike","isSymbol","objectToString$1","symbolTag","toNumber","NAN","other","valueOf","replace","reTrim","isBinary","reIsBinary","test","reIsOctal","freeParseInt","slice","reIsBadHex","toInteger","INFINITY","sign","MAX_INTEGER","remainder","rest","start","TypeError","FUNC_ERROR_TEXT","nativeMax","undefined","arguments","index","array","Array","otherArgs","initialParams","fn","callback","pop","applyEach$1","eachfn","fns","go","that","cb","concat","noop","once","baseProperty","key","object","isLength","MAX_SAFE_INTEGER","isArrayLike","getLength","getIterator","coll","iteratorSymbol","getPrototype","nativeGetPrototype","Object","baseHas","hasOwnProperty","baseKeys","nativeKeys","baseTimes","n","iteratee","result","isArrayLikeObject","isArguments","hasOwnProperty$1","propertyIsEnumerable","objectToString$2","argsTag","isString","isArray","objectToString$3","stringTag","indexKeys","String","isIndex","reIsUint","MAX_SAFE_INTEGER$1","isPrototype","Ctor","constructor","proto","prototype","objectProto$5","keys","isProto","indexes","skipIndexes","push","iterator","len","i","iterate","item","next","done","okeys","onlyOnce","Error","_eachOfLimit","limit","obj","nextElem","running","errored","replenish","elem","err","doParallelLimit","_asyncMap","arr","results","v","doLimit","iterable","asyncify","e","then","message","arrayEach","createBaseFor","fromRight","keysFunc","props","baseForOwn","baseFor","stackClear","__data__","map","eq","assocIndexOf","assocDelete","lastIndex","splice","stackDelete","data","assocGet","stackGet","get","assocHas","stackHas","has","isHostObject","toString","isNative","reIsNative","funcToString","reIsHostCtor","getNative","Hash","checkGlobal","mapClear","hash","Map","string","hashHas","nativeCreate","hasOwnProperty$3","hashDelete","isKeyable","mapDelete","hashGet","HASH_UNDEFINED","hasOwnProperty$4","mapGet","mapHas","assocSet","hashSet","HASH_UNDEFINED$1","mapSet","set","MapCache","values","clear","entry","stackSet","LARGE_ARRAY_SIZE","Stack","arraySome","predicate","equalArrays","equalFunc","customizer","bitmask","stack","isPartial","PARTIAL_COMPARE_FLAG$2","isUnordered","UNORDERED_COMPARE_FLAG$1","arrLength","othLength","stacked","arrValue","othValue","compared","mapToArray","size","forEach","setToArray","equalByTag","dataViewTag","byteLength","byteOffset","buffer","arrayBufferTag","Uint8Array","boolTag","dateTag","errorTag","name","numberTag","regexpTag","stringTag$1","mapTag","convert","setTag","PARTIAL_COMPARE_FLAG$3","UNORDERED_COMPARE_FLAG$2","symbolTag$1","symbolValueOf","equalObjects","PARTIAL_COMPARE_FLAG$4","objProps","objLength","othProps","skipCtor","objValue","objCtor","othCtor","getTag","objectToString$4","isTypedArray","typedArrayTags","objectToString$5","baseIsEqualDeep","objIsArr","othIsArr","objTag","arrayTag","othTag","getTag$1","argsTag$1","objectTag","objIsObj","othIsObj","isSameTag","PARTIAL_COMPARE_FLAG$1","objIsWrapped","hasOwnProperty$5","othIsWrapped","objUnwrapped","othUnwrapped","baseIsEqual","baseIsMatch","source","matchData","noCustomizer","srcValue","UNORDERED_COMPARE_FLAG","PARTIAL_COMPARE_FLAG","isStrictComparable","arrayMap","baseToPairs","toPairs","getMatchData","baseMatches","memoize","resolver","FUNC_ERROR_TEXT$1","memoized","cache","Cache","symbolToString","INFINITY$1","baseCastPath","stringToPath","isKey","reIsPlainProp","reIsDeepProp","baseGet","path","defaultValue","baseHasIn","hasPath","hasFunc","hasIn","baseMatchesProperty","UNORDERED_COMPARE_FLAG$3","PARTIAL_COMPARE_FLAG$5","identity","basePropertyDeep","property","baseIteratee","forOwn","indexOfNaN","fromIndex","baseIndexOf","auto","tasks","concurrency","enqueueTask","task","readyTasks","runTask","processQueue","runningTasks","run","shift","addListener","taskName","taskListeners","listeners","taskComplete","hasError","taskCallback","safeResults","val","rkey","taskFn","keys$$","numTasks","checkForDeadlocks","dep","dependencies","join","remainingDependencies","dependencyName","copyArray","parseParams","match","argsRegex","split","autoInject","newTasks","newTask","taskCb","newArgs","params","unshift","queue","worker","payload","_insert","q","pos","started","idle","setImmediate$1","drain","process","_next","workers","removed","workersList","unsaturated","saturated","empty","paused","kill","pause","resume","resumeCount","Math","min","w","cargo","eachOfLimit","reduce","memo","eachOfSeries","x","seq","newargs","nextargs","compose","reverse","concat$1","y","doParallel","eachOf","doSeries","_createTester","check","getResult","wrappedIteratee","_","_findGetResult","consoleFunc","console","error","during","truth","doDuring","calls","whilst","doWhilst","doUntil","_withoutIndex","eachLimit","ensureAsync","sync","innerArgs","notId","_filter","sort","a","b","forever","iterator$1","makeCallback","memoize$1","hasher","create","queues","l","unmemoized","_parallel","parallelLimit","queue$1","items","priorityQueue","_compareTasks","priority","_binarySearch","sequence","compare","beg","end","mid","createBaseEach","eachFunc","collection","baseEach","race","reduceRight","reversed","reflect","reflectCallback","cbArgs","reject$1","reflectAll","series","retry","times","parseTimes","acc","t","DEFAULT_TIMES","interval","DEFAULT_INTERVAL","retryAttempt","isFinalAttempt","seriesCallback","retryInterval","setTimeout","opts","attempts","retryable","sortBy","comparator","left","right","criteria","timeout","asyncFn","miliseconds","info","injectedCallback","timedOut","originalCallback","clearTimeout","timer","timeoutCallback","code","origCallback","baseRange","step","nativeMax$1","nativeCeil","timeLimit","count","mapLimit","transform","k","unmemoize","until","waterfall","nextTask","taskIndex","objectProto","objectProto$1","parseInt","max","Symbol","getPrototypeOf","objectProto$2","objectProto$3","objectProto$4","Infinity","applyEach","mapSeries","applyEachSeries","apply$1","callArgs","arrayProto","reRegExpChar","objectProto$7","Function","hasOwnProperty$2","RegExp","objectProto$6","objectTypes","function","freeExports","nodeType","freeModule","freeGlobal","freeSelf","self","freeWindow","window","thisGlobal","root","objectProto$8","objectProto$9","Symbol$1","symbolProto","DataView","Promise","Set","WeakMap","mapTag$1","objectTag$1","promiseTag","setTag$1","weakMapTag","dataViewTag$1","objectProto$11","funcToString$1","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","ArrayBuffer","resolve","ctorString","argsTag$2","arrayTag$1","boolTag$1","dateTag$1","errorTag$1","funcTag$1","mapTag$2","numberTag$1","objectTag$2","regexpTag$1","setTag$2","stringTag$2","weakMapTag$1","arrayBufferTag$1","dataViewTag$2","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","objectProto$12","objectProto$10","_defer","symbolProto$1","rePropName","reEscapeChar","number","quote","_setImmediate","setImmediate","nextTick","concatSeries","constant","ignoredArgs","detect","detectLimit","detectSeries","dir","each","eachSeries","everyLimit","every","everySeries","filterLimit","filter","filterSeries","log","parallel","rejectLimit","reject","rejectSeries","someLimit","Boolean","some","someSeries","ceil","timesSeries","timesLimit","all","any","forEachSeries","forEachLimit","forEachOf","forEachOfSeries","forEachOfLimit","inject","foldl","foldr","select","selectLimit","selectSeries","wrapSync","allLimit","allSeries","anyLimit","anySeries","find","findLimit","findSeries"],"mappings":"CAAC,SAAUA,EAAQC,GACI,gBAAZC,UAA0C,mBAAXC,QAAyBF,EAAQC,SACrD,kBAAXE,SAAyBA,OAAOC,IAAMD,QAAQ,WAAYH,GAChEA,EAASD,EAAOM,MAAQN,EAAOM,YAClCC,KAAM,SAAUL,GAAW,YAYzB,SAASM,GAAMC,EAAMC,EAASC,GAC5B,GAAIC,GAASD,EAAKC,MAClB,QAAQA,GACN,IAAK,GAAG,MAAOH,GAA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tB1mB,EAAQqoB,aAAezB,GACvB5mB,EAAQsoB,SAAW3f"}
\ No newline at end of file +{"version":3,"file":"build/dist/async.min.js","sources":["build/dist/async.js"],"names":["global","factory","exports","module","define","amd","async","this","apply","func","thisArg","args","length","call","isObject","value","type","isFunction","tag","objectToString","funcTag","genTag","isObjectLike","isSymbol","objectToString$1","symbolTag","toNumber","NAN","other","valueOf","replace","reTrim","isBinary","reIsBinary","test","reIsOctal","freeParseInt","slice","reIsBadHex","toInteger","INFINITY","sign","MAX_INTEGER","remainder","rest","start","TypeError","FUNC_ERROR_TEXT","nativeMax","undefined","arguments","index","array","Array","otherArgs","initialParams","fn","callback","pop","applyEach$1","eachfn","fns","go","that","cb","concat","noop","once","callFn","baseProperty","key","object","isLength","MAX_SAFE_INTEGER","isArrayLike","getLength","getIterator","coll","iteratorSymbol","getPrototype","nativeGetPrototype","Object","baseHas","hasOwnProperty","baseKeys","nativeKeys","baseTimes","n","iteratee","result","isArrayLikeObject","isArguments","hasOwnProperty$1","propertyIsEnumerable","objectToString$2","argsTag","isString","isArray","objectToString$3","stringTag","indexKeys","String","isIndex","reIsUint","MAX_SAFE_INTEGER$1","isPrototype","Ctor","constructor","proto","prototype","objectProto$5","keys","isProto","indexes","skipIndexes","push","iterator","len","i","iterate","item","next","done","okeys","onlyOnce","Error","_eachOfLimit","limit","obj","nextElem","running","errored","replenish","elem","err","doParallelLimit","_asyncMap","arr","results","v","doLimit","iterable","asyncify","e","then","message","arrayEach","createBaseFor","fromRight","keysFunc","props","baseForOwn","baseFor","stackClear","__data__","map","eq","assocIndexOf","assocDelete","lastIndex","splice","stackDelete","data","assocGet","stackGet","get","assocHas","stackHas","has","isHostObject","toString","isNative","reIsNative","funcToString","reIsHostCtor","getNative","Hash","checkGlobal","mapClear","hash","Map","string","hashHas","nativeCreate","hasOwnProperty$3","hashDelete","isKeyable","mapDelete","hashGet","HASH_UNDEFINED","hasOwnProperty$4","mapGet","mapHas","assocSet","hashSet","HASH_UNDEFINED$1","mapSet","set","MapCache","values","clear","entry","stackSet","LARGE_ARRAY_SIZE","Stack","arraySome","predicate","equalArrays","equalFunc","customizer","bitmask","stack","isPartial","PARTIAL_COMPARE_FLAG$2","isUnordered","UNORDERED_COMPARE_FLAG$1","arrLength","othLength","stacked","arrValue","othValue","compared","mapToArray","size","forEach","setToArray","equalByTag","dataViewTag","byteLength","byteOffset","buffer","arrayBufferTag","Uint8Array","boolTag","dateTag","errorTag","name","numberTag","regexpTag","stringTag$1","mapTag","convert","setTag","PARTIAL_COMPARE_FLAG$3","UNORDERED_COMPARE_FLAG$2","symbolTag$1","symbolValueOf","equalObjects","PARTIAL_COMPARE_FLAG$4","objProps","objLength","othProps","skipCtor","objValue","objCtor","othCtor","getTag","objectToString$4","isTypedArray","typedArrayTags","objectToString$5","baseIsEqualDeep","objIsArr","othIsArr","objTag","arrayTag","othTag","getTag$1","argsTag$1","objectTag","objIsObj","othIsObj","isSameTag","PARTIAL_COMPARE_FLAG$1","objIsWrapped","hasOwnProperty$5","othIsWrapped","objUnwrapped","othUnwrapped","baseIsEqual","baseIsMatch","source","matchData","noCustomizer","srcValue","UNORDERED_COMPARE_FLAG","PARTIAL_COMPARE_FLAG","isStrictComparable","arrayMap","baseToPairs","toPairs","getMatchData","baseMatches","memoize","resolver","FUNC_ERROR_TEXT$1","memoized","cache","Cache","symbolToString","INFINITY$1","baseCastPath","stringToPath","isKey","reIsPlainProp","reIsDeepProp","baseGet","path","defaultValue","baseHasIn","hasPath","hasFunc","hasIn","baseMatchesProperty","UNORDERED_COMPARE_FLAG$3","PARTIAL_COMPARE_FLAG$5","identity","basePropertyDeep","property","baseIteratee","forOwn","indexOfNaN","fromIndex","baseIndexOf","auto","tasks","concurrency","enqueueTask","task","readyTasks","runTask","processQueue","runningTasks","run","shift","addListener","taskName","taskListeners","listeners","taskComplete","hasError","taskCallback","safeResults","val","rkey","taskFn","checkForDeadlocks","currentTask","counter","readyToCheck","getDependents","dependent","uncheckedDependencies","numTasks","keys$$","dependencies","remainingDependencies","dependencyName","join","copyArray","parseParams","match","argsRegex","split","autoInject","newTasks","newTask","taskCb","newArgs","params","queue","worker","payload","_insert","q","pos","started","idle","setImmediate$1","drain","unshift","process","_next","workers","removed","workersList","unsaturated","saturated","empty","paused","kill","pause","resume","resumeCount","Math","min","w","cargo","eachOfLimit","reduce","memo","eachOfSeries","x","seq","newargs","nextargs","compose","reverse","concat$1","y","doParallel","eachOf","doSeries","_createTester","check","getResult","wrappedIteratee","_","_findGetResult","consoleFunc","console","error","during","truth","doDuring","calls","whilst","doWhilst","doUntil","_withoutIndex","eachLimit","ensureAsync","sync","innerArgs","notId","_filter","sort","a","b","forever","iterator$1","makeCallback","memoize$1","hasher","create","queues","l","unmemoized","_parallel","parallelLimit","queue$1","items","priorityQueue","_compareTasks","priority","_binarySearch","sequence","compare","beg","end","mid","createBaseEach","eachFunc","collection","baseEach","race","reduceRight","reversed","reflect","reflectCallback","cbArgs","reject$1","reflectAll","series","retry","times","parseTimes","acc","t","DEFAULT_TIMES","interval","DEFAULT_INTERVAL","retryAttempt","isFinalAttempt","seriesCallback","retryInterval","setTimeout","opts","attempts","retryable","sortBy","comparator","left","right","criteria","timeout","asyncFn","miliseconds","info","injectedCallback","timedOut","originalCallback","clearTimeout","timer","timeoutCallback","code","origCallback","baseRange","step","nativeMax$1","nativeCeil","timeLimit","count","mapLimit","transform","k","unmemoize","until","waterfall","nextTask","taskIndex","objectProto","objectProto$1","parseInt","max","Symbol","getPrototypeOf","objectProto$2","objectProto$3","objectProto$4","Infinity","applyEach","mapSeries","applyEachSeries","apply$1","callArgs","arrayProto","reRegExpChar","objectProto$7","Function","hasOwnProperty$2","RegExp","objectProto$6","objectTypes","function","freeExports","nodeType","freeModule","freeGlobal","freeSelf","self","freeWindow","window","thisGlobal","root","objectProto$8","objectProto$9","Symbol$1","symbolProto","DataView","Promise","Set","WeakMap","mapTag$1","objectTag$1","promiseTag","setTag$1","weakMapTag","dataViewTag$1","objectProto$11","funcToString$1","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","ArrayBuffer","resolve","ctorString","argsTag$2","arrayTag$1","boolTag$1","dateTag$1","errorTag$1","funcTag$1","mapTag$2","numberTag$1","objectTag$2","regexpTag$1","setTag$2","stringTag$2","weakMapTag$1","arrayBufferTag$1","dataViewTag$2","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","objectProto$12","objectProto$10","_defer","symbolProto$1","rePropName","reEscapeChar","number","quote","_setImmediate","setImmediate","nextTick","concatSeries","constant","ignoredArgs","detect","detectLimit","detectSeries","dir","each","eachSeries","everyLimit","every","everySeries","filterLimit","filter","filterSeries","log","parallel","rejectLimit","reject","rejectSeries","someLimit","Boolean","some","someSeries","ceil","timesSeries","timesLimit","all","any","forEachSeries","forEachLimit","forEachOf","forEachOfSeries","forEachOfLimit","inject","foldl","foldr","select","selectLimit","selectSeries","wrapSync","allLimit","allSeries","anyLimit","anySeries","find","findLimit","findSeries"],"mappings":"CAAC,SAAUA,EAAQC,GACI,gBAAZC,UAA0C,mBAAXC,QAAyBF,EAAQC,SACrD,kBAAXE,SAAyBA,OAAOC,IAAMD,QAAQ,WAAYH,GAChEA,EAASD,EAAOM,MAAQN,EAAOM,YAClCC,KAAM,SAAUL,GAAW,YAYzB,SAASM,GAAMC,EAAMC,EAASC,GAC5B,GAAIC,GAASD,EAAKC,MAClB,QAAQA,GACN,IAAK,GAAG,MAAOH,GAAKI,KAAKH,EACzB,KAAK,GAAG,MAAOD,GAAKI,KAAKH,EAASC,EAAK,GACvC,KAAK,GAAG,MAAOF,GAAKI,KAAKH,EAASC,EAAK,GAAIA,EAAK,GAChD,KAAK,GAAG,MAAOF,GAAKI,KAAKH,EAASC,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAE3D,MAAOF,GAAKD,MAAME,EAASC,GA2B7B,QAASG,GAASC,GAChB,GAAIC,SAAcD,EAClB,SAASA,IAAkB,UAARC,GAA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B,aAAeA,GACvBvnB,EAAQwd,MAAQA,GAChBxd,EAAQue,UAAYA,GACpBve,EAAQiZ,IAAMA,GACdjZ,EAAQud,OAASA,GACjBvd,EAAQkmB,aAAe1O,GACvBxX,EAAQ0nB,KAAOA,GACf1nB,EAAQwnB,UAAYA,GACpBxnB,EAAQ2nB,WAAaA,GACrB3nB,EAAQwe,OAASA,GACjBxe,EAAQ6e,QAAUA,GAClB7e,EAAQyd,MAAQA,GAChBzd,EAAQ8nB,WAAajI,GACrB7f,EAAQ6nB,YAAcA,GACtB7nB,EAAQggB,UAAYA,GACpBhgB,EAAQkgB,UAAYA,GACpBlgB,EAAQmgB,MAAQA,GAChBngB,EAAQogB,UAAYA,GACpBpgB,EAAQwa,OAASA,GACjBxa,EAAQ+nB,IAAMjB,GACd9mB,EAAQ6oB,SAAWhC,GACnB7mB,EAAQ8oB,UAAY/B,GACpB/mB,EAAQgoB,IAAMN,GACd1nB,EAAQ+oB,SAAWvB,GACnBxnB,EAAQgpB,UAAYrB,GACpB3nB,EAAQipB,KAAO1C,GACfvmB,EAAQkpB,UAAY1C,GACpBxmB,EAAQmpB,WAAa1C,GACrBzmB,EAAQ8N,QAAU6Y,GAClB3mB,EAAQioB,cAAgBrB,GACxB5mB,EAAQkoB,aAAetN,GACvB5a,EAAQmoB,UAAY1O,GACpBzZ,EAAQooB,gBAAkBrP,GAC1B/Y,EAAQqoB,eAAiBzP,GACzB5Y,EAAQsoB,OAASzP,GACjB7Y,EAAQuoB,MAAQ1P,GAChB7Y,EAAQwoB,MAAQxL,GAChBhd,EAAQyoB,OAASxB,GACjBjnB,EAAQ0oB,YAAc1B,GACtBhnB,EAAQ2oB,aAAezB,GACvBlnB,EAAQ4oB,SAAWhgB"}
\ No newline at end of file diff --git a/package.json b/package.json index 6c8eb02..ae61e55 100644 --- a/package.json +++ b/package.json @@ -91,4 +91,4 @@ "tests" ] } -} +}
\ No newline at end of file |