b3894ad64419903d5e36a5dcfb08c0c4ab3cd451
[yaffs-website] / node_modules / uncss / node_modules / form-data / node_modules / async / mapSeries.js
1 'use strict';
2
3 Object.defineProperty(exports, "__esModule", {
4   value: true
5 });
6
7 var _mapLimit = require('./mapLimit');
8
9 var _mapLimit2 = _interopRequireDefault(_mapLimit);
10
11 var _doLimit = require('./internal/doLimit');
12
13 var _doLimit2 = _interopRequireDefault(_doLimit);
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 only a single async operation at a time.
19  *
20  * @name mapSeries
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 {Function} iteratee - A function to apply to each item in `coll`.
28  * The iteratee is passed a `callback(err, transformed)` which must be called
29  * once it has completed with an error (which can be `null`) and a
30  * transformed item. Invoked with (item, callback).
31  * @param {Function} [callback] - A callback which is called when all `iteratee`
32  * functions have finished, or an error occurs. Results is an array of the
33  * transformed items from the `coll`. Invoked with (err, results).
34  */
35 exports.default = (0, _doLimit2.default)(_mapLimit2.default, 1);
36 module.exports = exports['default'];