@reeywhaar/iterator

Library to work with javascript generators

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
10Oct 1, 2018Aug 12, 2017Minified + gzip package size for @reeywhaar/iterator in KB

Readme

Iterator library

Library to work with javascript generators

npm install @reeywhaar/iterator
Iterator
.fromArray([0,1,2,3,4,5,6,7,8])
.take(5) // [0,1,2,3,4]
.map(x => x * 2) // [0,2,4,6,8]
.skip(2) // [4,6,8]
.subSplit(function*(item){
    yield item;
    yield "a";
}) // [4,"a",6,"a",8,"a"]
.odd() // ["a","a","a"]
// ...and so on. Check out Documentation

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.