2020-11-27 18:27:44 +00:00
|
|
|
async function asyncForEach(
|
|
|
|
array: Array<any>,
|
2020-12-14 08:23:29 +00:00
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
|
|
callback: (arg0: any, arg1: number, arg2: Array<any>) => void
|
2020-11-27 18:27:44 +00:00
|
|
|
): Promise<void> {
|
2020-03-05 18:32:34 +00:00
|
|
|
for (let index = 0; index < array.length; index += 1) {
|
2020-11-27 18:27:44 +00:00
|
|
|
// eslint-disable-next-line no-await-in-loop
|
2020-03-05 18:32:34 +00:00
|
|
|
await callback(array[index], index, array);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export { asyncForEach };
|