UNPKG

1.35 kBJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6
7var _doLimit = require('./internal/doLimit');
8
9var _doLimit2 = _interopRequireDefault(_doLimit);
10
11var _groupByLimit = require('./groupByLimit');
12
13var _groupByLimit2 = _interopRequireDefault(_groupByLimit);
14
15function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
17/**
18 * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time.
19 *
20 * @name groupBySeries
21 * @static
22 * @memberOf module:Collections
23 * @method
24 * @see [async.groupBy]{@link module:Collections.groupBy}
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 {AsyncFunction} iteratee - An async function to apply to each item in
29 * `coll`.
30 * The iteratee should complete with a `key` to group the value under.
31 * Invoked with (value, callback).
32 * @param {Function} [callback] - A callback which is called when all `iteratee`
33 * functions have finished, or an error occurs. Result is an `Object` whoses
34 * properties are arrays of values which returned the corresponding key.
35 */
36exports.default = (0, _doLimit2.default)(_groupByLimit2.default, 1);
37module.exports = exports['default'];
\No newline at end of file