Licence
AGPL-3.0
Version
2.0.1
Deps
1
Size
481 kB
Vulns
0
Weekly
0
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)
@iterable-iterator/next
Iterator next function for JavaScript. See docs.
Depending on your environment, the code may require
regeneratorRuntimeto 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