embark-area-51/lib/utils/async_extend.js

16 lines
287 B
JavaScript

let async = require('async');
function asyncEachObject(object, iterator, callback) {
async.each(
Object.keys(object || {}),
function (key, next) {
iterator(key, object[key], next);
},
callback
);
}
async.eachObject = asyncEachObject;
module.exports = async;