get-iterable
v1.0.0
Published
Get a iterable as a array of items
Downloads
2
Readme
get-iterable
Get a iterable as a array
See Array.from
for more.
Install
$ npm install --save get-iterable
Usage
const getStream = require('get-iterable');
function * generator() {
yield 1;
yield 2;
yield 3;
}
const arr = getIterable(generator());
console.log(arr);
/*
[1,2,3]
*/
});
API
getIterable(iterable)
Get the iterable as a array.
Related
- get-stream - Get stream as a string or buffer
- get-stdin - Get stdin as a string or buffer
License
MIT © Vsevolod Strukchisnky