Skip to content

floatdrop/get-iterable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-iterable Build Status

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

License

MIT © Vsevolod Strukchisnky

About

Get a iterable as a array of items

Resources

License

Stars

Watchers

Forks

Packages

No packages published