awaiting-foreach
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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()

Readme

Keywords

none

Package Sidebar

Install

npm i awaiting-foreach

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

1.33 kB

Total Files

5

Last publish

Collaborators

  • codingtubareal