@qntm-code/utils
Version:
A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.
13 lines (12 loc) • 398 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.asyncForEach = void 0;
/**
* Allows you to iterate over an array asynchronously
*/
async function asyncForEach(array, callback) {
for (let index = 0, arrayLength = array.length; index < arrayLength; index++) {
await callback(array[index], index, array);
}
}
exports.asyncForEach = asyncForEach;