A base class for iterator results.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
docs
src
test
.babelrc
.esdoc.json
.gitattributes
.gitignore
.travis.yml
LICENSE.md
README.md
package.json
rollup.config.js

README.md

Iterator Result

Build status NPM version Dependencies

The iterator protocol defines a standard way to produce a sequence of values. An object is an iterator when it implements a next() method which returns objects that have at least the two properties value and done. This module provides a base class for such iterator results.

API Reference

Installation

npm install iterator-result

Usage

import IteratorResult from "iterator-result";

export class InfiniteIterator {

	constructor() {

		this.result = new IteratorResult();

	}

	next() {

		return this.result;

	}

}

Contributing

Maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.