empty-iterator

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i empty-iterator

Weekly Downloads

4,022

Version

1.0.0

License

MIT

Unpacked Size

2.22 kB

Total Files

4

Last publish

Collaborators

  • lamansky