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

1.0.3 • Public • Published

mapf Build Status NPM MIT

Ergonomic Promise.all

Installation

npm install mapf --save

Usage

import { mapf } from 'mapf'

const [a, b, c] = await mapf([1, 2, 3], async _ => await foo(_))

Rationale

// before
const [a, b, c] = await Promise.all([1, 2, 3].map(async _ => await foo(_)))

// after
const [a, b, c] = await mapf([1, 2, 3], async _ => await foo(_)))

Tests

npm test

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i mapf

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • bcherny