1.0.0 • Published 8 years ago
@f/iterator-symbol v1.0.0
iterator-symbol
The iterator symbol.
Installation
$ npm install @f/iterator-symbol
Usage
var iteratorSymbol = require('@f/iterator-symbol')
var myIterable = {}
myIterable[iteratorSymbol] = function * () {
yield 1;
yield 2;
yield 3;
}
Array.from(myIterable) // [1, 2, 3]
License
MIT
1.0.0
8 years ago