This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
it-all with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Collects all values from an async iterator and returns them as an array
For when you need a one-liner to collect iterable values.
$ npm install --save it-all
const all = require('it-all') // This can also be an iterator, async iterator, generator, etc const values = [0, 1, 2, 3, 4] const arr = await all(values) console.info(arr) // 0, 1, 2, 3, 4