summaryrefslogtreecommitdiff
path: root/lib/mapValuesLimit.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mapValuesLimit.js')
-rw-r--r--lib/mapValuesLimit.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/mapValuesLimit.js b/lib/mapValuesLimit.js
index 47e6072..2267aaf 100644
--- a/lib/mapValuesLimit.js
+++ b/lib/mapValuesLimit.js
@@ -29,13 +29,11 @@ export default function mapValuesLimit(obj, limit, iteratee, callback) {
callback = once(callback || noop);
var newObj = {};
var _iteratee = wrapAsync(iteratee)
- eachOfLimit(obj, limit, function(val, key, next) {
- _iteratee(val, key, function (err, result) {
+ eachOfLimit(obj, limit, (val, key, next) => {
+ _iteratee(val, key, (err, result) => {
if (err) return next(err);
newObj[key] = result;
next();
});
- }, function (err) {
- callback(err, newObj);
- });
+ }, err => callback(err, newObj));
}