@iterable-iterator/next
v2.0.1
Published
Iterator next function for JavaScript
Downloads
1,080
Readme
:next_track_button: @iterable-iterator/next
Iterator next function for JavaScript. See docs.
:warning: Depending on your environment, the code may require
regeneratorRuntime
to be defined, for instance by importing regenerator-runtime/runtime.
import {iter} from '@iterable-iterator/iter';
import {next, StopIteration} from '@iterable-iterator/next';
next(iter('ABC')); // A
next(iter('')); // throws StopIteration
// With default parameter
next(iter(''), 'x'); // x