Sudoo-Iterator

Build Status codecov npm version downloads

Iterator is a package that provide iteratable instances for JavaScript / TypeScript.

Install

yarn add @sudoo/iterator
# Or
npm install @sudoo/iterator --save

Usage

All class exported from this package implements the Iterable interface. So you can use it as a iterable object.

Use with Loop

const iterable = SomeIterator.create() // Iterable instance
for(const each of iterable) {
    // Do Something
}

Use with Spread

const iterable = SomeIterator.create() // Iterable instance
const values = [...iterable];

Modules

This section is currently work in progress.