1.1.3 • Published 4 years ago

asyncarray-aj v1.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

instalation!

npm i asyncarray-aj

import

import asyncArray from 'asyncarray-aj'

description

asyncArray(array,cb(currentValue,index))
its array looping 
where you can make async action

Examples1

let newArray =asyncArray([2,3,4,5], ((elemnt,index)=>{
if(elemnt%2==0){
return element
}
}))
newArray.then(data=>{
console.log(data)
})

result 2 and 4

Examples2

let newArray =asyncArray(listids,async ((elemnt,index)=>{
let user = await axios.get('https://url.com/element')
if(user.name=="jack"){
return user
}
}).
newArray.then(data=>{
console.log(data)
}) 

result any user has jack as name.

1.1.3

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago