mobilizon/js/src/utils/asyncForEach.ts
Thomas Citharel c732ec7f87
Add ability to add message for participation and improve participation
management interface

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-03-06 09:00:48 +01:00

8 lines
185 B
TypeScript

async function asyncForEach(array, callback) {
for (let index = 0; index < array.length; index += 1) {
await callback(array[index], index, array);
}
}
export { asyncForEach };