@aegenet/belt-array-async-map
v2.3.0
Published
Array async map (sequentially)
Downloads
85
Readme
@aegenet/belt-array-async-map
Array async map (sequentially)
💾 Installation
yarn add @aegenet/belt-array-async-map@^2.0.0
# or
npm i @aegenet/belt-array-async-map@^2.0.0
📝 Usage
import { arrayAsyncMap } from '@aegenet/belt-array-async-map';
const result = await arrayAsyncMap(
[
{
id: 5,
value: 'Yo',
}, {
id: 7,
value: 'Ho',
}
],
(value, idx, array) => /** a promise */ Promise.resolve(idx)
);
// result = [0, 1]