UNPKG

@qntm-code/utils

Version:

A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.

9 lines (8 loc) 260 B
/** * Allows you to iterate over an array asynchronously */ export async function asyncForEach(array, callback) { for (let index = 0, arrayLength = array.length; index < arrayLength; index++) { await callback(array[index], index, array); } }