root / HServer / 00.Server / 00.Program / node_modules / async / mapLimit.js
이력 | 보기 | 이력해설 | 다운로드 (1.37 KB)
| 1 | 39 | HKM | 'use strict';
|
|---|---|---|---|
| 2 | |||
| 3 | Object.defineProperty(exports, "__esModule", {
|
||
| 4 | value: true |
||
| 5 | }); |
||
| 6 | |||
| 7 | var _doParallelLimit = require('./internal/doParallelLimit'); |
||
| 8 | |||
| 9 | var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit);
|
||
| 10 | |||
| 11 | var _map = require('./internal/map'); |
||
| 12 | |||
| 13 | var _map2 = _interopRequireDefault(_map);
|
||
| 14 | |||
| 15 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
||
| 16 | |||
| 17 | /**
|
||
| 18 | * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.
|
||
| 19 | *
|
||
| 20 | * @name mapLimit
|
||
| 21 | * @static
|
||
| 22 | * @memberOf module:Collections
|
||
| 23 | * @method
|
||
| 24 | * @see [async.map]{@link module:Collections.map}
|
||
| 25 | * @category Collection
|
||
| 26 | * @param {Array|Iterable|Object} coll - A collection to iterate over.
|
||
| 27 | * @param {number} limit - The maximum number of async operations at a time.
|
||
| 28 | * @param {Function} iteratee - A function to apply to each item in `coll`.
|
||
| 29 | * The iteratee is passed a `callback(err, transformed)` which must be called
|
||
| 30 | * once it has completed with an error (which can be `null`) and a transformed
|
||
| 31 | * item. Invoked with (item, callback).
|
||
| 32 | * @param {Function} [callback] - A callback which is called when all `iteratee`
|
||
| 33 | * functions have finished, or an error occurs. Results is an array of the
|
||
| 34 | * transformed items from the `coll`. Invoked with (err, results).
|
||
| 35 | */
|
||
| 36 | exports.default = (0, _doParallelLimit2.default)(_map2.default); |
||
| 37 | module.exports = exports['default']; |