stop-iteration-iterator <sup>Version Badge</sup>

github actions coverage License Downloads

npm badge

Firefox 17-26 iterators throw a StopIteration object to indicate "done". This normalizes it.

Usage

var stopIterationIterator = require('stop-iteration-iterator');

var s = new Set([1, 2]);

var iterator = stopIterationIterator(s.keys());

iterator.next(); // { done: false, value: 1 }

Tests

Simply clone the repo, npm install, and run npm test

stop-iteration-iterator - Installation

To install stop-iteration-iterator via this registry, you'll need to install via the --registry parameter with your package manager.

n

NPM

npm install stop-iteration-iterator --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Yarn

yarn config set registry https://js.registry.sudovanilla.org
yarn install stop-iteration-iterator

Learn more about the config option.

PNPM

pnpm install stop-iteration-iterator --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Bun Logo

Bun

bun install stop-iteration-iterator --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Learn more about setting this up in your bunfig.toml configuration.


For Deno, add the following to your .npmrc file in your directory:

registry="https://js.registry.sudovanilla.org"

Then run the deno install command.

stop-iteration-iterator - Download

Download Tarball (v1.1.0)

Integrity sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==
SHASUM f481ff70a548f6124d0312c3aa14cbfa7aa542ad
Tarball https://js.registry.sudovanilla.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz