merge-iterators

1.0.0 • Public • Published

merge-iterators

Merge iterators into one

npm i merge-iterators

Usage

const mergeIterators = require('merge-iterators')

const it = mergeIterators([
  (async function * () { yield 1 })(),
  (function * () { yield 2 })(),
  (async function * () { yield 3 })(),
  (function * () { yield 4 })()
])

for await (const value of it) {
  console.log(value) // 2, 4, 1, 3
}

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i merge-iterators

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

7.48 kB

Total Files

6

Last publish

Collaborators

  • lukks