source: frontend/node_modules/async/mapValuesSeries.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.3 KB
Line 
1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = mapValuesSeries;
7
8var _mapValuesLimit = require('./mapValuesLimit.js');
9
10var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit);
11
12function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
14/**
15 * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.
16 *
17 * @name mapValuesSeries
18 * @static
19 * @memberOf module:Collections
20 * @method
21 * @see [async.mapValues]{@link module:Collections.mapValues}
22 * @category Collection
23 * @param {Object} obj - A collection to iterate over.
24 * @param {AsyncFunction} iteratee - A function to apply to each value and key
25 * in `coll`.
26 * The iteratee should complete with the transformed value as its result.
27 * Invoked with (value, key, callback).
28 * @param {Function} [callback] - A callback which is called when all `iteratee`
29 * functions have finished, or an error occurs. `result` is a new object consisting
30 * of each key from `obj`, with each transformed value on the right-hand side.
31 * Invoked with (err, result).
32 * @returns {Promise} a promise, if no callback is passed
33 */
34function mapValuesSeries(obj, iteratee, callback) {
35 return (0, _mapValuesLimit2.default)(obj, 1, iteratee, callback);
36}
37module.exports = exports.default;
Note: See TracBrowser for help on using the repository browser.