yield-contract/scripts/utils.js
2020-08-30 23:33:16 +05:30

5 lines
176 B
JavaScript

module.exports.asyncForEach = async (array, callback) => {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
}
};