[6a3a178] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
---|
| 4 | value: true
|
---|
| 5 | });
|
---|
| 6 | exports.wrapSync = exports.selectSeries = exports.selectLimit = exports.select = exports.foldr = exports.foldl = exports.inject = exports.forEachOfLimit = exports.forEachOfSeries = exports.forEachOf = exports.forEachLimit = exports.forEachSeries = exports.forEach = exports.findSeries = exports.findLimit = exports.find = exports.anySeries = exports.anyLimit = exports.any = exports.allSeries = exports.allLimit = exports.all = exports.whilst = exports.waterfall = exports.until = exports.unmemoize = exports.tryEach = exports.transform = exports.timesSeries = exports.timesLimit = exports.times = exports.timeout = exports.sortBy = exports.someSeries = exports.someLimit = exports.some = exports.setImmediate = exports.series = exports.seq = exports.retryable = exports.retry = exports.rejectSeries = exports.rejectLimit = exports.reject = exports.reflectAll = exports.reflect = exports.reduceRight = exports.reduce = exports.race = exports.queue = exports.priorityQueue = exports.parallelLimit = exports.parallel = exports.nextTick = exports.memoize = exports.mapValuesSeries = exports.mapValuesLimit = exports.mapValues = exports.mapSeries = exports.mapLimit = exports.map = exports.log = exports.groupBySeries = exports.groupByLimit = exports.groupBy = exports.forever = exports.filterSeries = exports.filterLimit = exports.filter = exports.everySeries = exports.everyLimit = exports.every = exports.ensureAsync = exports.eachSeries = exports.eachOfSeries = exports.eachOfLimit = exports.eachOf = exports.eachLimit = exports.each = exports.during = exports.doWhilst = exports.doUntil = exports.doDuring = exports.dir = exports.detectSeries = exports.detectLimit = exports.detect = exports.constant = exports.concatSeries = exports.concatLimit = exports.concat = exports.compose = exports.cargo = exports.autoInject = exports.auto = exports.asyncify = exports.applyEachSeries = exports.applyEach = exports.apply = undefined;
|
---|
| 7 |
|
---|
| 8 | var _apply = require('./apply');
|
---|
| 9 |
|
---|
| 10 | var _apply2 = _interopRequireDefault(_apply);
|
---|
| 11 |
|
---|
| 12 | var _applyEach = require('./applyEach');
|
---|
| 13 |
|
---|
| 14 | var _applyEach2 = _interopRequireDefault(_applyEach);
|
---|
| 15 |
|
---|
| 16 | var _applyEachSeries = require('./applyEachSeries');
|
---|
| 17 |
|
---|
| 18 | var _applyEachSeries2 = _interopRequireDefault(_applyEachSeries);
|
---|
| 19 |
|
---|
| 20 | var _asyncify = require('./asyncify');
|
---|
| 21 |
|
---|
| 22 | var _asyncify2 = _interopRequireDefault(_asyncify);
|
---|
| 23 |
|
---|
| 24 | var _auto = require('./auto');
|
---|
| 25 |
|
---|
| 26 | var _auto2 = _interopRequireDefault(_auto);
|
---|
| 27 |
|
---|
| 28 | var _autoInject = require('./autoInject');
|
---|
| 29 |
|
---|
| 30 | var _autoInject2 = _interopRequireDefault(_autoInject);
|
---|
| 31 |
|
---|
| 32 | var _cargo = require('./cargo');
|
---|
| 33 |
|
---|
| 34 | var _cargo2 = _interopRequireDefault(_cargo);
|
---|
| 35 |
|
---|
| 36 | var _compose = require('./compose');
|
---|
| 37 |
|
---|
| 38 | var _compose2 = _interopRequireDefault(_compose);
|
---|
| 39 |
|
---|
| 40 | var _concat = require('./concat');
|
---|
| 41 |
|
---|
| 42 | var _concat2 = _interopRequireDefault(_concat);
|
---|
| 43 |
|
---|
| 44 | var _concatLimit = require('./concatLimit');
|
---|
| 45 |
|
---|
| 46 | var _concatLimit2 = _interopRequireDefault(_concatLimit);
|
---|
| 47 |
|
---|
| 48 | var _concatSeries = require('./concatSeries');
|
---|
| 49 |
|
---|
| 50 | var _concatSeries2 = _interopRequireDefault(_concatSeries);
|
---|
| 51 |
|
---|
| 52 | var _constant = require('./constant');
|
---|
| 53 |
|
---|
| 54 | var _constant2 = _interopRequireDefault(_constant);
|
---|
| 55 |
|
---|
| 56 | var _detect = require('./detect');
|
---|
| 57 |
|
---|
| 58 | var _detect2 = _interopRequireDefault(_detect);
|
---|
| 59 |
|
---|
| 60 | var _detectLimit = require('./detectLimit');
|
---|
| 61 |
|
---|
| 62 | var _detectLimit2 = _interopRequireDefault(_detectLimit);
|
---|
| 63 |
|
---|
| 64 | var _detectSeries = require('./detectSeries');
|
---|
| 65 |
|
---|
| 66 | var _detectSeries2 = _interopRequireDefault(_detectSeries);
|
---|
| 67 |
|
---|
| 68 | var _dir = require('./dir');
|
---|
| 69 |
|
---|
| 70 | var _dir2 = _interopRequireDefault(_dir);
|
---|
| 71 |
|
---|
| 72 | var _doDuring = require('./doDuring');
|
---|
| 73 |
|
---|
| 74 | var _doDuring2 = _interopRequireDefault(_doDuring);
|
---|
| 75 |
|
---|
| 76 | var _doUntil = require('./doUntil');
|
---|
| 77 |
|
---|
| 78 | var _doUntil2 = _interopRequireDefault(_doUntil);
|
---|
| 79 |
|
---|
| 80 | var _doWhilst = require('./doWhilst');
|
---|
| 81 |
|
---|
| 82 | var _doWhilst2 = _interopRequireDefault(_doWhilst);
|
---|
| 83 |
|
---|
| 84 | var _during = require('./during');
|
---|
| 85 |
|
---|
| 86 | var _during2 = _interopRequireDefault(_during);
|
---|
| 87 |
|
---|
| 88 | var _each = require('./each');
|
---|
| 89 |
|
---|
| 90 | var _each2 = _interopRequireDefault(_each);
|
---|
| 91 |
|
---|
| 92 | var _eachLimit = require('./eachLimit');
|
---|
| 93 |
|
---|
| 94 | var _eachLimit2 = _interopRequireDefault(_eachLimit);
|
---|
| 95 |
|
---|
| 96 | var _eachOf = require('./eachOf');
|
---|
| 97 |
|
---|
| 98 | var _eachOf2 = _interopRequireDefault(_eachOf);
|
---|
| 99 |
|
---|
| 100 | var _eachOfLimit = require('./eachOfLimit');
|
---|
| 101 |
|
---|
| 102 | var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
|
---|
| 103 |
|
---|
| 104 | var _eachOfSeries = require('./eachOfSeries');
|
---|
| 105 |
|
---|
| 106 | var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
|
---|
| 107 |
|
---|
| 108 | var _eachSeries = require('./eachSeries');
|
---|
| 109 |
|
---|
| 110 | var _eachSeries2 = _interopRequireDefault(_eachSeries);
|
---|
| 111 |
|
---|
| 112 | var _ensureAsync = require('./ensureAsync');
|
---|
| 113 |
|
---|
| 114 | var _ensureAsync2 = _interopRequireDefault(_ensureAsync);
|
---|
| 115 |
|
---|
| 116 | var _every = require('./every');
|
---|
| 117 |
|
---|
| 118 | var _every2 = _interopRequireDefault(_every);
|
---|
| 119 |
|
---|
| 120 | var _everyLimit = require('./everyLimit');
|
---|
| 121 |
|
---|
| 122 | var _everyLimit2 = _interopRequireDefault(_everyLimit);
|
---|
| 123 |
|
---|
| 124 | var _everySeries = require('./everySeries');
|
---|
| 125 |
|
---|
| 126 | var _everySeries2 = _interopRequireDefault(_everySeries);
|
---|
| 127 |
|
---|
| 128 | var _filter = require('./filter');
|
---|
| 129 |
|
---|
| 130 | var _filter2 = _interopRequireDefault(_filter);
|
---|
| 131 |
|
---|
| 132 | var _filterLimit = require('./filterLimit');
|
---|
| 133 |
|
---|
| 134 | var _filterLimit2 = _interopRequireDefault(_filterLimit);
|
---|
| 135 |
|
---|
| 136 | var _filterSeries = require('./filterSeries');
|
---|
| 137 |
|
---|
| 138 | var _filterSeries2 = _interopRequireDefault(_filterSeries);
|
---|
| 139 |
|
---|
| 140 | var _forever = require('./forever');
|
---|
| 141 |
|
---|
| 142 | var _forever2 = _interopRequireDefault(_forever);
|
---|
| 143 |
|
---|
| 144 | var _groupBy = require('./groupBy');
|
---|
| 145 |
|
---|
| 146 | var _groupBy2 = _interopRequireDefault(_groupBy);
|
---|
| 147 |
|
---|
| 148 | var _groupByLimit = require('./groupByLimit');
|
---|
| 149 |
|
---|
| 150 | var _groupByLimit2 = _interopRequireDefault(_groupByLimit);
|
---|
| 151 |
|
---|
| 152 | var _groupBySeries = require('./groupBySeries');
|
---|
| 153 |
|
---|
| 154 | var _groupBySeries2 = _interopRequireDefault(_groupBySeries);
|
---|
| 155 |
|
---|
| 156 | var _log = require('./log');
|
---|
| 157 |
|
---|
| 158 | var _log2 = _interopRequireDefault(_log);
|
---|
| 159 |
|
---|
| 160 | var _map = require('./map');
|
---|
| 161 |
|
---|
| 162 | var _map2 = _interopRequireDefault(_map);
|
---|
| 163 |
|
---|
| 164 | var _mapLimit = require('./mapLimit');
|
---|
| 165 |
|
---|
| 166 | var _mapLimit2 = _interopRequireDefault(_mapLimit);
|
---|
| 167 |
|
---|
| 168 | var _mapSeries = require('./mapSeries');
|
---|
| 169 |
|
---|
| 170 | var _mapSeries2 = _interopRequireDefault(_mapSeries);
|
---|
| 171 |
|
---|
| 172 | var _mapValues = require('./mapValues');
|
---|
| 173 |
|
---|
| 174 | var _mapValues2 = _interopRequireDefault(_mapValues);
|
---|
| 175 |
|
---|
| 176 | var _mapValuesLimit = require('./mapValuesLimit');
|
---|
| 177 |
|
---|
| 178 | var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit);
|
---|
| 179 |
|
---|
| 180 | var _mapValuesSeries = require('./mapValuesSeries');
|
---|
| 181 |
|
---|
| 182 | var _mapValuesSeries2 = _interopRequireDefault(_mapValuesSeries);
|
---|
| 183 |
|
---|
| 184 | var _memoize = require('./memoize');
|
---|
| 185 |
|
---|
| 186 | var _memoize2 = _interopRequireDefault(_memoize);
|
---|
| 187 |
|
---|
| 188 | var _nextTick = require('./nextTick');
|
---|
| 189 |
|
---|
| 190 | var _nextTick2 = _interopRequireDefault(_nextTick);
|
---|
| 191 |
|
---|
| 192 | var _parallel = require('./parallel');
|
---|
| 193 |
|
---|
| 194 | var _parallel2 = _interopRequireDefault(_parallel);
|
---|
| 195 |
|
---|
| 196 | var _parallelLimit = require('./parallelLimit');
|
---|
| 197 |
|
---|
| 198 | var _parallelLimit2 = _interopRequireDefault(_parallelLimit);
|
---|
| 199 |
|
---|
| 200 | var _priorityQueue = require('./priorityQueue');
|
---|
| 201 |
|
---|
| 202 | var _priorityQueue2 = _interopRequireDefault(_priorityQueue);
|
---|
| 203 |
|
---|
| 204 | var _queue = require('./queue');
|
---|
| 205 |
|
---|
| 206 | var _queue2 = _interopRequireDefault(_queue);
|
---|
| 207 |
|
---|
| 208 | var _race = require('./race');
|
---|
| 209 |
|
---|
| 210 | var _race2 = _interopRequireDefault(_race);
|
---|
| 211 |
|
---|
| 212 | var _reduce = require('./reduce');
|
---|
| 213 |
|
---|
| 214 | var _reduce2 = _interopRequireDefault(_reduce);
|
---|
| 215 |
|
---|
| 216 | var _reduceRight = require('./reduceRight');
|
---|
| 217 |
|
---|
| 218 | var _reduceRight2 = _interopRequireDefault(_reduceRight);
|
---|
| 219 |
|
---|
| 220 | var _reflect = require('./reflect');
|
---|
| 221 |
|
---|
| 222 | var _reflect2 = _interopRequireDefault(_reflect);
|
---|
| 223 |
|
---|
| 224 | var _reflectAll = require('./reflectAll');
|
---|
| 225 |
|
---|
| 226 | var _reflectAll2 = _interopRequireDefault(_reflectAll);
|
---|
| 227 |
|
---|
| 228 | var _reject = require('./reject');
|
---|
| 229 |
|
---|
| 230 | var _reject2 = _interopRequireDefault(_reject);
|
---|
| 231 |
|
---|
| 232 | var _rejectLimit = require('./rejectLimit');
|
---|
| 233 |
|
---|
| 234 | var _rejectLimit2 = _interopRequireDefault(_rejectLimit);
|
---|
| 235 |
|
---|
| 236 | var _rejectSeries = require('./rejectSeries');
|
---|
| 237 |
|
---|
| 238 | var _rejectSeries2 = _interopRequireDefault(_rejectSeries);
|
---|
| 239 |
|
---|
| 240 | var _retry = require('./retry');
|
---|
| 241 |
|
---|
| 242 | var _retry2 = _interopRequireDefault(_retry);
|
---|
| 243 |
|
---|
| 244 | var _retryable = require('./retryable');
|
---|
| 245 |
|
---|
| 246 | var _retryable2 = _interopRequireDefault(_retryable);
|
---|
| 247 |
|
---|
| 248 | var _seq = require('./seq');
|
---|
| 249 |
|
---|
| 250 | var _seq2 = _interopRequireDefault(_seq);
|
---|
| 251 |
|
---|
| 252 | var _series = require('./series');
|
---|
| 253 |
|
---|
| 254 | var _series2 = _interopRequireDefault(_series);
|
---|
| 255 |
|
---|
| 256 | var _setImmediate = require('./setImmediate');
|
---|
| 257 |
|
---|
| 258 | var _setImmediate2 = _interopRequireDefault(_setImmediate);
|
---|
| 259 |
|
---|
| 260 | var _some = require('./some');
|
---|
| 261 |
|
---|
| 262 | var _some2 = _interopRequireDefault(_some);
|
---|
| 263 |
|
---|
| 264 | var _someLimit = require('./someLimit');
|
---|
| 265 |
|
---|
| 266 | var _someLimit2 = _interopRequireDefault(_someLimit);
|
---|
| 267 |
|
---|
| 268 | var _someSeries = require('./someSeries');
|
---|
| 269 |
|
---|
| 270 | var _someSeries2 = _interopRequireDefault(_someSeries);
|
---|
| 271 |
|
---|
| 272 | var _sortBy = require('./sortBy');
|
---|
| 273 |
|
---|
| 274 | var _sortBy2 = _interopRequireDefault(_sortBy);
|
---|
| 275 |
|
---|
| 276 | var _timeout = require('./timeout');
|
---|
| 277 |
|
---|
| 278 | var _timeout2 = _interopRequireDefault(_timeout);
|
---|
| 279 |
|
---|
| 280 | var _times = require('./times');
|
---|
| 281 |
|
---|
| 282 | var _times2 = _interopRequireDefault(_times);
|
---|
| 283 |
|
---|
| 284 | var _timesLimit = require('./timesLimit');
|
---|
| 285 |
|
---|
| 286 | var _timesLimit2 = _interopRequireDefault(_timesLimit);
|
---|
| 287 |
|
---|
| 288 | var _timesSeries = require('./timesSeries');
|
---|
| 289 |
|
---|
| 290 | var _timesSeries2 = _interopRequireDefault(_timesSeries);
|
---|
| 291 |
|
---|
| 292 | var _transform = require('./transform');
|
---|
| 293 |
|
---|
| 294 | var _transform2 = _interopRequireDefault(_transform);
|
---|
| 295 |
|
---|
| 296 | var _tryEach = require('./tryEach');
|
---|
| 297 |
|
---|
| 298 | var _tryEach2 = _interopRequireDefault(_tryEach);
|
---|
| 299 |
|
---|
| 300 | var _unmemoize = require('./unmemoize');
|
---|
| 301 |
|
---|
| 302 | var _unmemoize2 = _interopRequireDefault(_unmemoize);
|
---|
| 303 |
|
---|
| 304 | var _until = require('./until');
|
---|
| 305 |
|
---|
| 306 | var _until2 = _interopRequireDefault(_until);
|
---|
| 307 |
|
---|
| 308 | var _waterfall = require('./waterfall');
|
---|
| 309 |
|
---|
| 310 | var _waterfall2 = _interopRequireDefault(_waterfall);
|
---|
| 311 |
|
---|
| 312 | var _whilst = require('./whilst');
|
---|
| 313 |
|
---|
| 314 | var _whilst2 = _interopRequireDefault(_whilst);
|
---|
| 315 |
|
---|
| 316 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
---|
| 317 |
|
---|
| 318 | exports.default = {
|
---|
| 319 | apply: _apply2.default,
|
---|
| 320 | applyEach: _applyEach2.default,
|
---|
| 321 | applyEachSeries: _applyEachSeries2.default,
|
---|
| 322 | asyncify: _asyncify2.default,
|
---|
| 323 | auto: _auto2.default,
|
---|
| 324 | autoInject: _autoInject2.default,
|
---|
| 325 | cargo: _cargo2.default,
|
---|
| 326 | compose: _compose2.default,
|
---|
| 327 | concat: _concat2.default,
|
---|
| 328 | concatLimit: _concatLimit2.default,
|
---|
| 329 | concatSeries: _concatSeries2.default,
|
---|
| 330 | constant: _constant2.default,
|
---|
| 331 | detect: _detect2.default,
|
---|
| 332 | detectLimit: _detectLimit2.default,
|
---|
| 333 | detectSeries: _detectSeries2.default,
|
---|
| 334 | dir: _dir2.default,
|
---|
| 335 | doDuring: _doDuring2.default,
|
---|
| 336 | doUntil: _doUntil2.default,
|
---|
| 337 | doWhilst: _doWhilst2.default,
|
---|
| 338 | during: _during2.default,
|
---|
| 339 | each: _each2.default,
|
---|
| 340 | eachLimit: _eachLimit2.default,
|
---|
| 341 | eachOf: _eachOf2.default,
|
---|
| 342 | eachOfLimit: _eachOfLimit2.default,
|
---|
| 343 | eachOfSeries: _eachOfSeries2.default,
|
---|
| 344 | eachSeries: _eachSeries2.default,
|
---|
| 345 | ensureAsync: _ensureAsync2.default,
|
---|
| 346 | every: _every2.default,
|
---|
| 347 | everyLimit: _everyLimit2.default,
|
---|
| 348 | everySeries: _everySeries2.default,
|
---|
| 349 | filter: _filter2.default,
|
---|
| 350 | filterLimit: _filterLimit2.default,
|
---|
| 351 | filterSeries: _filterSeries2.default,
|
---|
| 352 | forever: _forever2.default,
|
---|
| 353 | groupBy: _groupBy2.default,
|
---|
| 354 | groupByLimit: _groupByLimit2.default,
|
---|
| 355 | groupBySeries: _groupBySeries2.default,
|
---|
| 356 | log: _log2.default,
|
---|
| 357 | map: _map2.default,
|
---|
| 358 | mapLimit: _mapLimit2.default,
|
---|
| 359 | mapSeries: _mapSeries2.default,
|
---|
| 360 | mapValues: _mapValues2.default,
|
---|
| 361 | mapValuesLimit: _mapValuesLimit2.default,
|
---|
| 362 | mapValuesSeries: _mapValuesSeries2.default,
|
---|
| 363 | memoize: _memoize2.default,
|
---|
| 364 | nextTick: _nextTick2.default,
|
---|
| 365 | parallel: _parallel2.default,
|
---|
| 366 | parallelLimit: _parallelLimit2.default,
|
---|
| 367 | priorityQueue: _priorityQueue2.default,
|
---|
| 368 | queue: _queue2.default,
|
---|
| 369 | race: _race2.default,
|
---|
| 370 | reduce: _reduce2.default,
|
---|
| 371 | reduceRight: _reduceRight2.default,
|
---|
| 372 | reflect: _reflect2.default,
|
---|
| 373 | reflectAll: _reflectAll2.default,
|
---|
| 374 | reject: _reject2.default,
|
---|
| 375 | rejectLimit: _rejectLimit2.default,
|
---|
| 376 | rejectSeries: _rejectSeries2.default,
|
---|
| 377 | retry: _retry2.default,
|
---|
| 378 | retryable: _retryable2.default,
|
---|
| 379 | seq: _seq2.default,
|
---|
| 380 | series: _series2.default,
|
---|
| 381 | setImmediate: _setImmediate2.default,
|
---|
| 382 | some: _some2.default,
|
---|
| 383 | someLimit: _someLimit2.default,
|
---|
| 384 | someSeries: _someSeries2.default,
|
---|
| 385 | sortBy: _sortBy2.default,
|
---|
| 386 | timeout: _timeout2.default,
|
---|
| 387 | times: _times2.default,
|
---|
| 388 | timesLimit: _timesLimit2.default,
|
---|
| 389 | timesSeries: _timesSeries2.default,
|
---|
| 390 | transform: _transform2.default,
|
---|
| 391 | tryEach: _tryEach2.default,
|
---|
| 392 | unmemoize: _unmemoize2.default,
|
---|
| 393 | until: _until2.default,
|
---|
| 394 | waterfall: _waterfall2.default,
|
---|
| 395 | whilst: _whilst2.default,
|
---|
| 396 |
|
---|
| 397 | // aliases
|
---|
| 398 | all: _every2.default,
|
---|
| 399 | allLimit: _everyLimit2.default,
|
---|
| 400 | allSeries: _everySeries2.default,
|
---|
| 401 | any: _some2.default,
|
---|
| 402 | anyLimit: _someLimit2.default,
|
---|
| 403 | anySeries: _someSeries2.default,
|
---|
| 404 | find: _detect2.default,
|
---|
| 405 | findLimit: _detectLimit2.default,
|
---|
| 406 | findSeries: _detectSeries2.default,
|
---|
| 407 | forEach: _each2.default,
|
---|
| 408 | forEachSeries: _eachSeries2.default,
|
---|
| 409 | forEachLimit: _eachLimit2.default,
|
---|
| 410 | forEachOf: _eachOf2.default,
|
---|
| 411 | forEachOfSeries: _eachOfSeries2.default,
|
---|
| 412 | forEachOfLimit: _eachOfLimit2.default,
|
---|
| 413 | inject: _reduce2.default,
|
---|
| 414 | foldl: _reduce2.default,
|
---|
| 415 | foldr: _reduceRight2.default,
|
---|
| 416 | select: _filter2.default,
|
---|
| 417 | selectLimit: _filterLimit2.default,
|
---|
| 418 | selectSeries: _filterSeries2.default,
|
---|
| 419 | wrapSync: _asyncify2.default
|
---|
| 420 | }; /**
|
---|
| 421 | * An "async function" in the context of Async is an asynchronous function with
|
---|
| 422 | * a variable number of parameters, with the final parameter being a callback.
|
---|
| 423 | * (`function (arg1, arg2, ..., callback) {}`)
|
---|
| 424 | * The final callback is of the form `callback(err, results...)`, which must be
|
---|
| 425 | * called once the function is completed. The callback should be called with a
|
---|
| 426 | * Error as its first argument to signal that an error occurred.
|
---|
| 427 | * Otherwise, if no error occurred, it should be called with `null` as the first
|
---|
| 428 | * argument, and any additional `result` arguments that may apply, to signal
|
---|
| 429 | * successful completion.
|
---|
| 430 | * The callback must be called exactly once, ideally on a later tick of the
|
---|
| 431 | * JavaScript event loop.
|
---|
| 432 | *
|
---|
| 433 | * This type of function is also referred to as a "Node-style async function",
|
---|
| 434 | * or a "continuation passing-style function" (CPS). Most of the methods of this
|
---|
| 435 | * library are themselves CPS/Node-style async functions, or functions that
|
---|
| 436 | * return CPS/Node-style async functions.
|
---|
| 437 | *
|
---|
| 438 | * Wherever we accept a Node-style async function, we also directly accept an
|
---|
| 439 | * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}.
|
---|
| 440 | * In this case, the `async` function will not be passed a final callback
|
---|
| 441 | * argument, and any thrown error will be used as the `err` argument of the
|
---|
| 442 | * implicit callback, and the return value will be used as the `result` value.
|
---|
| 443 | * (i.e. a `rejected` of the returned Promise becomes the `err` callback
|
---|
| 444 | * argument, and a `resolved` value becomes the `result`.)
|
---|
| 445 | *
|
---|
| 446 | * Note, due to JavaScript limitations, we can only detect native `async`
|
---|
| 447 | * functions and not transpilied implementations.
|
---|
| 448 | * Your environment must have `async`/`await` support for this to work.
|
---|
| 449 | * (e.g. Node > v7.6, or a recent version of a modern browser).
|
---|
| 450 | * If you are using `async` functions through a transpiler (e.g. Babel), you
|
---|
| 451 | * must still wrap the function with [asyncify]{@link module:Utils.asyncify},
|
---|
| 452 | * because the `async function` will be compiled to an ordinary function that
|
---|
| 453 | * returns a promise.
|
---|
| 454 | *
|
---|
| 455 | * @typedef {Function} AsyncFunction
|
---|
| 456 | * @static
|
---|
| 457 | */
|
---|
| 458 |
|
---|
| 459 | /**
|
---|
| 460 | * Async is a utility module which provides straight-forward, powerful functions
|
---|
| 461 | * for working with asynchronous JavaScript. Although originally designed for
|
---|
| 462 | * use with [Node.js](http://nodejs.org) and installable via
|
---|
| 463 | * `npm install --save async`, it can also be used directly in the browser.
|
---|
| 464 | * @module async
|
---|
| 465 | * @see AsyncFunction
|
---|
| 466 | */
|
---|
| 467 |
|
---|
| 468 | /**
|
---|
| 469 | * A collection of `async` functions for manipulating collections, such as
|
---|
| 470 | * arrays and objects.
|
---|
| 471 | * @module Collections
|
---|
| 472 | */
|
---|
| 473 |
|
---|
| 474 | /**
|
---|
| 475 | * A collection of `async` functions for controlling the flow through a script.
|
---|
| 476 | * @module ControlFlow
|
---|
| 477 | */
|
---|
| 478 |
|
---|
| 479 | /**
|
---|
| 480 | * A collection of `async` utility functions.
|
---|
| 481 | * @module Utils
|
---|
| 482 | */
|
---|
| 483 |
|
---|
| 484 | exports.apply = _apply2.default;
|
---|
| 485 | exports.applyEach = _applyEach2.default;
|
---|
| 486 | exports.applyEachSeries = _applyEachSeries2.default;
|
---|
| 487 | exports.asyncify = _asyncify2.default;
|
---|
| 488 | exports.auto = _auto2.default;
|
---|
| 489 | exports.autoInject = _autoInject2.default;
|
---|
| 490 | exports.cargo = _cargo2.default;
|
---|
| 491 | exports.compose = _compose2.default;
|
---|
| 492 | exports.concat = _concat2.default;
|
---|
| 493 | exports.concatLimit = _concatLimit2.default;
|
---|
| 494 | exports.concatSeries = _concatSeries2.default;
|
---|
| 495 | exports.constant = _constant2.default;
|
---|
| 496 | exports.detect = _detect2.default;
|
---|
| 497 | exports.detectLimit = _detectLimit2.default;
|
---|
| 498 | exports.detectSeries = _detectSeries2.default;
|
---|
| 499 | exports.dir = _dir2.default;
|
---|
| 500 | exports.doDuring = _doDuring2.default;
|
---|
| 501 | exports.doUntil = _doUntil2.default;
|
---|
| 502 | exports.doWhilst = _doWhilst2.default;
|
---|
| 503 | exports.during = _during2.default;
|
---|
| 504 | exports.each = _each2.default;
|
---|
| 505 | exports.eachLimit = _eachLimit2.default;
|
---|
| 506 | exports.eachOf = _eachOf2.default;
|
---|
| 507 | exports.eachOfLimit = _eachOfLimit2.default;
|
---|
| 508 | exports.eachOfSeries = _eachOfSeries2.default;
|
---|
| 509 | exports.eachSeries = _eachSeries2.default;
|
---|
| 510 | exports.ensureAsync = _ensureAsync2.default;
|
---|
| 511 | exports.every = _every2.default;
|
---|
| 512 | exports.everyLimit = _everyLimit2.default;
|
---|
| 513 | exports.everySeries = _everySeries2.default;
|
---|
| 514 | exports.filter = _filter2.default;
|
---|
| 515 | exports.filterLimit = _filterLimit2.default;
|
---|
| 516 | exports.filterSeries = _filterSeries2.default;
|
---|
| 517 | exports.forever = _forever2.default;
|
---|
| 518 | exports.groupBy = _groupBy2.default;
|
---|
| 519 | exports.groupByLimit = _groupByLimit2.default;
|
---|
| 520 | exports.groupBySeries = _groupBySeries2.default;
|
---|
| 521 | exports.log = _log2.default;
|
---|
| 522 | exports.map = _map2.default;
|
---|
| 523 | exports.mapLimit = _mapLimit2.default;
|
---|
| 524 | exports.mapSeries = _mapSeries2.default;
|
---|
| 525 | exports.mapValues = _mapValues2.default;
|
---|
| 526 | exports.mapValuesLimit = _mapValuesLimit2.default;
|
---|
| 527 | exports.mapValuesSeries = _mapValuesSeries2.default;
|
---|
| 528 | exports.memoize = _memoize2.default;
|
---|
| 529 | exports.nextTick = _nextTick2.default;
|
---|
| 530 | exports.parallel = _parallel2.default;
|
---|
| 531 | exports.parallelLimit = _parallelLimit2.default;
|
---|
| 532 | exports.priorityQueue = _priorityQueue2.default;
|
---|
| 533 | exports.queue = _queue2.default;
|
---|
| 534 | exports.race = _race2.default;
|
---|
| 535 | exports.reduce = _reduce2.default;
|
---|
| 536 | exports.reduceRight = _reduceRight2.default;
|
---|
| 537 | exports.reflect = _reflect2.default;
|
---|
| 538 | exports.reflectAll = _reflectAll2.default;
|
---|
| 539 | exports.reject = _reject2.default;
|
---|
| 540 | exports.rejectLimit = _rejectLimit2.default;
|
---|
| 541 | exports.rejectSeries = _rejectSeries2.default;
|
---|
| 542 | exports.retry = _retry2.default;
|
---|
| 543 | exports.retryable = _retryable2.default;
|
---|
| 544 | exports.seq = _seq2.default;
|
---|
| 545 | exports.series = _series2.default;
|
---|
| 546 | exports.setImmediate = _setImmediate2.default;
|
---|
| 547 | exports.some = _some2.default;
|
---|
| 548 | exports.someLimit = _someLimit2.default;
|
---|
| 549 | exports.someSeries = _someSeries2.default;
|
---|
| 550 | exports.sortBy = _sortBy2.default;
|
---|
| 551 | exports.timeout = _timeout2.default;
|
---|
| 552 | exports.times = _times2.default;
|
---|
| 553 | exports.timesLimit = _timesLimit2.default;
|
---|
| 554 | exports.timesSeries = _timesSeries2.default;
|
---|
| 555 | exports.transform = _transform2.default;
|
---|
| 556 | exports.tryEach = _tryEach2.default;
|
---|
| 557 | exports.unmemoize = _unmemoize2.default;
|
---|
| 558 | exports.until = _until2.default;
|
---|
| 559 | exports.waterfall = _waterfall2.default;
|
---|
| 560 | exports.whilst = _whilst2.default;
|
---|
| 561 | exports.all = _every2.default;
|
---|
| 562 | exports.allLimit = _everyLimit2.default;
|
---|
| 563 | exports.allSeries = _everySeries2.default;
|
---|
| 564 | exports.any = _some2.default;
|
---|
| 565 | exports.anyLimit = _someLimit2.default;
|
---|
| 566 | exports.anySeries = _someSeries2.default;
|
---|
| 567 | exports.find = _detect2.default;
|
---|
| 568 | exports.findLimit = _detectLimit2.default;
|
---|
| 569 | exports.findSeries = _detectSeries2.default;
|
---|
| 570 | exports.forEach = _each2.default;
|
---|
| 571 | exports.forEachSeries = _eachSeries2.default;
|
---|
| 572 | exports.forEachLimit = _eachLimit2.default;
|
---|
| 573 | exports.forEachOf = _eachOf2.default;
|
---|
| 574 | exports.forEachOfSeries = _eachOfSeries2.default;
|
---|
| 575 | exports.forEachOfLimit = _eachOfLimit2.default;
|
---|
| 576 | exports.inject = _reduce2.default;
|
---|
| 577 | exports.foldl = _reduce2.default;
|
---|
| 578 | exports.foldr = _reduceRight2.default;
|
---|
| 579 | exports.select = _filter2.default;
|
---|
| 580 | exports.selectLimit = _filterLimit2.default;
|
---|
| 581 | exports.selectSeries = _filterSeries2.default;
|
---|
| 582 | exports.wrapSync = _asyncify2.default; |
---|