diff options
Diffstat (limited to 'lib/mapValuesSeries.js')
-rw-r--r-- | lib/mapValuesSeries.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/mapValuesSeries.js b/lib/mapValuesSeries.js new file mode 100644 index 0000000..163d474 --- /dev/null +++ b/lib/mapValuesSeries.js @@ -0,0 +1,21 @@ +import mapValuesLimit from './mapValuesLimit'; +import doLimit from './internal/doLimit'; + +/** + * The same as `mapValues` but runs only a single async operation at a time. + * + * @name mapValuesSeries + * @static + * @memberOf async + * @see async.mapValues + * @category Collection + * @param {Object} obj - A collection to iterate over. + * @param {Function} iteratee - A function to apply to each value in `obj`. + * The iteratee is passed a `callback(err, transformed)` which must be called + * once it has completed with an error (which can be `null`) and a + * transformed value. Invoked with (value, key, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Result is an object of the + * transformed values from the `obj`. Invoked with (err, result). + */ +export default doLimit(mapValuesLimit, 1); |