@aegenet/belt-array-async-map
TypeScript icon, indicating that this package has built-in type declarations

1.5.0 • Public • Published

npm version

@aegenet/belt-array-async-map

Array async map (sequentially)

💾 Installation

yarn add @aegenet/belt-array-async-map@^1.4.0
# or
npm i @aegenet/belt-array-async-map@^1.4.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]

Readme

Keywords

Package Sidebar

Install

npm i @aegenet/belt-array-async-map

Weekly Downloads

1

Version

1.5.0

License

MIT

Unpacked Size

3.74 kB

Total Files

7

Last publish

Collaborators

  • agenet