Front end of the Slack clone application.

groupBySeries.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _doLimit = require('./internal/doLimit');
  6. var _doLimit2 = _interopRequireDefault(_doLimit);
  7. var _groupByLimit = require('./groupByLimit');
  8. var _groupByLimit2 = _interopRequireDefault(_groupByLimit);
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. /**
  11. * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time.
  12. *
  13. * @name groupBySeries
  14. * @static
  15. * @memberOf module:Collections
  16. * @method
  17. * @see [async.groupBy]{@link module:Collections.groupBy}
  18. * @category Collection
  19. * @param {Array|Iterable|Object} coll - A collection to iterate over.
  20. * @param {number} limit - The maximum number of async operations at a time.
  21. * @param {AsyncFunction} iteratee - An async function to apply to each item in
  22. * `coll`.
  23. * The iteratee should complete with a `key` to group the value under.
  24. * Invoked with (value, callback).
  25. * @param {Function} [callback] - A callback which is called when all `iteratee`
  26. * functions have finished, or an error occurs. Result is an `Object` whoses
  27. * properties are arrays of values which returned the corresponding key.
  28. */
  29. exports.default = (0, _doLimit2.default)(_groupByLimit2.default, 1);
  30. module.exports = exports['default'];