5476dfa74875aff4ea71ed465e69a2a0c311c1f3
[yaffs-website] / node_modules / grunt-uncss / node_modules / async / everyLimit.js
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 _doParallelLimit = require('./internal/doParallelLimit');
12
13 var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit);
14
15 var _notId = require('./internal/notId');
16
17 var _notId2 = _interopRequireDefault(_notId);
18
19 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
21 /**
22  * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
23  *
24  * @name everyLimit
25  * @static
26  * @memberOf module:Collections
27  * @method
28  * @see [async.every]{@link module:Collections.every}
29  * @alias allLimit
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
34  * collection in parallel. The iteratee is passed a `callback(err, truthValue)`
35  * which must be called with a  boolean argument once it has completed. Invoked
36  * with (item, callback).
37  * @param {Function} [callback] - A callback which is called after all the
38  * `iteratee` functions have finished. Result will be either `true` or `false`
39  * depending on the values of the async tests. Invoked with (err, result).
40  */
41 exports.default = (0, _doParallelLimit2.default)((0, _createTester2.default)(_notId2.default, _notId2.default));
42 module.exports = exports['default'];