empty-iterator

Creates an iterator that finishes immediately.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
empty-iterator
001.0.05 years ago5 years agoMinified + gzip package size for empty-iterator in KB

Readme

empty-iterator
Creates an iterator that finishes immediately.

Installation

Requires Node.js 4.0.0 or above.
npm i empty-iterator

API

The module exports a single function with no parameters. Each time it is called, it creates and returns a new empty iterator.

Example

const emptyIterator = require('empty-iterator')

emptyIterator().next().done // true