@reeywhaar/iterator
TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

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

API

Readme

Keywords

none

Package Sidebar

Install

npm i @reeywhaar/iterator

Weekly Downloads

1

Version

0.7.0

License

BSD-3-Clause

Unpacked Size

61 kB

Total Files

11

Last publish

Collaborators

  • reeywhaar