async-for-each

v2.1.1arrow_drop_down
v2.1.1
v2.1.0
v2.0.9
v2.0.8
v2.0.6
v2.0.5
v2.0.1
v1.1.1
v1.1.0
STATUS
Passing
DOWNLOADS
1,276
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
1 KB
async for each function to call await functions inside the loop
1 contributor
Install async-for-each as a package?
Copied
npm i @bit/joshk.jotils.async-for-each
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
asyncForEach (
array:Array,
callback:Function
)

async for each function to call await functions inside the loop

Example
asyncForEach(array, async function(element) {
     await asyncSleep(10000);
     console.log(element);
     await asyncSleep(10000);
})
Arguments
array: Array

is an array that we use normaly whit normal foreach like array.foreach(…)

callback: Function

any function

Help and resources