awaiting-foreach
v0.0.2
Published
An await-able forEach function
Downloads
1
Readme
Simple async-await function for looping over arrays
import asyncfe from "awaiting-foreach"
async function test () {
await asyncfe([100,200,300,400,500], async (item)=>{
await new Promise(r=>{
setTimeout(()=>{r()},item)
})
console.log(item)
})
console.log('done')
}
test()