root / HServer / 00.Server / 00.Program / node_modules / async / someLimit.js
이력 | 보기 | 이력해설 | 다운로드 (1.56 KB)
1 |
'use strict';
|
---|---|
2 |
|
3 |
Object.defineProperty(exports, "__esModule", {
|
4 |
value: true |
5 |
}); |
6 |
|
7 |
var _createTester = require('./internal/createTester'); |
8 |
|
9 |
var _createTester2 = _interopRequireDefault(_createTester);
|
10 |
|
11 |
var _eachOfLimit = require('./eachOfLimit'); |
12 |
|
13 |
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
|
14 |
|
15 |
var _identity = require('lodash/identity'); |
16 |
|
17 |
var _identity2 = _interopRequireDefault(_identity);
|
18 |
|
19 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
20 |
|
21 |
/**
|
22 |
* The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.
|
23 |
*
|
24 |
* @name someLimit
|
25 |
* @static
|
26 |
* @memberOf module:Collections
|
27 |
* @method
|
28 |
* @see [async.some]{@link module:Collections.some}
|
29 |
* @alias anyLimit
|
30 |
* @category Collection
|
31 |
* @param {Array|Iterable|Object} coll - A collection to iterate over.
|
32 |
* @param {number} limit - The maximum number of async operations at a time.
|
33 |
* @param {Function} iteratee - A truth test to apply to each item in the array
|
34 |
* in parallel. The iteratee is passed a `callback(err, truthValue)` which must
|
35 |
* be called with a boolean argument once it has completed. Invoked with
|
36 |
* (item, callback).
|
37 |
* @param {Function} [callback] - A callback which is called as soon as any
|
38 |
* iteratee returns `true`, or after all the iteratee functions have finished.
|
39 |
* Result will be either `true` or `false` depending on the values of the async
|
40 |
* tests. Invoked with (err, result).
|
41 |
*/
|
42 |
exports.default = (0, _createTester2.default)(_eachOfLimit2.default, Boolean, _identity2.default); |
43 |
module.exports = exports['default'];
|