MCPcopy
hub / github.com/caolan/async / mapValuesLimit

Function mapValuesLimit

lib/mapValuesLimit.js:28–41  ·  view source on GitHub ↗
(obj, limit, iteratee, callback)

Source from the content-addressed store, hash-verified

26 * Invoked with (err, result).
27 */
28export default function mapValuesLimit(obj, limit, iteratee, callback) {
29 callback = once(callback || noop);
30 var newObj = {};
31 var _iteratee = wrapAsync(iteratee)
32 eachOfLimit(obj, limit, function(val, key, next) {
33 _iteratee(val, key, function (err, result) {
34 if (err) return next(err);
35 newObj[key] = result;
36 next();
37 });
38 }, function (err) {
39 callback(err, newObj);
40 });
41}

Callers

nothing calls this directly

Calls 4

onceFunction · 0.85
wrapAsyncFunction · 0.85
eachOfLimitFunction · 0.85
nextFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…