iterator-generator

0.1.0 • Public • Published

Iterator Generator

An iterable interface to collections using ES2015 generators

Installation

npm install iterator-generator --save

Usage Example

'use strict';
import iterable from 'iterator-generator';

var list = ['a', 'b', 'c', 'd'];
var iterator = iterable(list);

var item;
while (!(item = iterator.next()).done) {
  console.log(item.value);
}

Outputs:

a
b
c
d

Readme

Keywords

Package Sidebar

Install

npm i iterator-generator

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • atticoos