/usr/local/lib/node_modules/pm2/node_modules/@pm2/io/node_modules/async
NameSizeModeActions
dist/-0755rm
internal/-0755rm
all.js16800644editdlrm
allLimit.js15450644editdlrm
allSeries.js12750644editdlrm
any.js17580644editdlrm
anyLimit.js15920644editdlrm
anySeries.js13140644editdlrm
apply.js18430644editdlrm
applyEach.js17790644editdlrm
applyEachSeries.js12850644editdlrm
asyncify.js35000644editdlrm
auto.js98440644editdlrm
autoInject.js64810644editdlrm
bower.json2450644editdlrm
cargo.js46510644editdlrm
CHANGELOG.md293400644editdlrm
compose.js15610644editdlrm
concat.js15880644editdlrm
concatLimit.js21620644editdlrm
concatSeries.js12720644editdlrm
constant.js17600644editdlrm
detect.js22080644editdlrm
detectLimit.js17600644editdlrm
detectSeries.js13530644editdlrm
dir.js12940644editdlrm
doDuring.js21830644editdlrm
doUntil.js13740644editdlrm
doWhilst.js20640644editdlrm
during.js22010644editdlrm
each.js28360644editdlrm
eachLimit.js15680644editdlrm
eachOf.js33680644editdlrm
eachOfLimit.js14180644editdlrm
eachOfSeries.js11370644editdlrm
eachSeries.js12060644editdlrm
ensureAsync.js25150644editdlrm
every.js16800644editdlrm
everyLimit.js15450644editdlrm
everySeries.js12750644editdlrm
filter.js15240644editdlrm
filterLimit.js13440644editdlrm
filterSeries.js12360644editdlrm
find.js22080644editdlrm
findLimit.js17600644editdlrm
findSeries.js13530644editdlrm
foldl.js26760644editdlrm
foldr.js15360644editdlrm
forEach.js28360644editdlrm
forEachLimit.js15680644editdlrm
forEachOf.js33680644editdlrm
forEachOfLimit.js14180644editdlrm
forEachOfSeries.js11370644editdlrm
forEachSeries.js12060644editdlrm
forever.js19410644editdlrm
groupBy.js21310644editdlrm
groupByLimit.js23790644editdlrm
groupBySeries.js13470644editdlrm
index.js195030644editdlrm
inject.js26760644editdlrm
LICENSE10630644editdlrm
log.js11940644editdlrm
map.js20810644editdlrm
mapLimit.js13140644editdlrm
mapSeries.js12090644editdlrm
mapValues.js22410644editdlrm
mapValuesLimit.js20370644editdlrm
mapValuesSeries.js13280644editdlrm
memoize.js32320644editdlrm
nextTick.js14470644editdlrm
package.json24120644editdlrm
parallel.js31000644editdlrm
parallelLimit.js14220644editdlrm
priorityQueue.js31040644editdlrm
queue.js58550644editdlrm
race.js21620644editdlrm
README.md25360644editdlrm
reduce.js26760644editdlrm
reduceRight.js15360644editdlrm
reflect.js23790644editdlrm
reflectAll.js27950644editdlrm
reject.js14480644editdlrm
rejectLimit.js12660644editdlrm
rejectSeries.js11580644editdlrm
retry.js54350644editdlrm
retryable.js20250644editdlrm
select.js15240644editdlrm
selectLimit.js13440644editdlrm
selectSeries.js12360644editdlrm
seq.js29860644editdlrm
series.js29370644editdlrm
setImmediate.js13890644editdlrm
some.js17580644editdlrm
someLimit.js15920644editdlrm
someSeries.js13140644editdlrm
sortBy.js28290644editdlrm
timeout.js27760644editdlrm
times.js14590644editdlrm
timesLimit.js13930644editdlrm
timesSeries.js10210644editdlrm
transform.js27150644editdlrm
tryEach.js25600644editdlrm
unmemoize.js6810644editdlrm
until.js14460644editdlrm
waterfall.js33430644editdlrm
whilst.js21910644editdlrm
wrapSync.js35000644editdlrm
Edit: /usr/local/lib/node_modules/pm2/node_modules/@pm2/io/node_modules/async/cargo.js (4651B)
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = cargo; var _queue = require('./internal/queue'); var _queue2 = _interopRequireDefault(_queue); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * A cargo of tasks for the worker function to complete. Cargo inherits all of * the same methods and event callbacks as [`queue`]{@link module:ControlFlow.queue}. * @typedef {Object} CargoObject * @memberOf module:ControlFlow * @property {Function} length - A function returning the number of items * waiting to be processed. Invoke like `cargo.length()`. * @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 like `cargo.push(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 like `cargo.idle()`. * @property {Function} pause - a function that pauses the processing of tasks * until `resume()` is called. Invoke like `cargo.pause()`. * @property {Function} resume - a function that resumes the processing of * queued tasks when the queue is paused. Invoke like `cargo.resume()`. * @property {Function} kill - a function that removes the `drain` callback and * empties remaining tasks from the queue forcing it to go idle. Invoke like `cargo.kill()`. */ /** * 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`]{@link module:ControlFlow.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 module:ControlFlow * @method * @see [async.queue]{@link module:ControlFlow.queue} * @category Control Flow * @param {AsyncFunction} worker - An asynchronous function for processing an array * of queued tasks. 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 {module:ControlFlow.CargoObject} 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