Package Exports
- it-merge
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (it-merge) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
it-merge
Collects all values from an (async) iterable into an array and returns it.
For when you need a one-liner to collect iterable values.
Nb. sources are iterated over in parallel so the order of emitted items is not guaranteed.
Install
$ npm install --save it-merge
Usage
const all = require('it-merge')
// This can also be an iterator, async iterator, generator, etc
const values1 = [0, 1, 2, 3, 4]
const values2 = [5, 6, 7, 8, 9]
const arr = await all(merge(values1, values2))
console.info(arr) // 0, 1, 5, 6, 2, 3, 4, 7, 8, 9 <- nb. order is not guaranteed