1.0.3 • Published 8 years ago

mapf v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago