embark/lib/utils/async_extend.js

16 lines
287 B
JavaScript
Raw Normal View History

2017-03-30 02:50:05 +09:00
let async = require('async');
2017-03-11 10:52:02 -05:00
function asyncEachObject(object, iterator, callback) {
async.each(
Object.keys(object || {}),
2017-03-30 20:12:39 +09:00
function (key, next) {
2017-03-11 10:52:02 -05:00
iterator(key, object[key], next);
},
callback
);
}
2017-03-30 20:12:39 +09:00
2017-03-11 10:52:02 -05:00
async.eachObject = asyncEachObject;
module.exports = async;