Skip to content

iterable-iterator/next

Folders and files

NameName
Last commit message
Last commit date
Feb 20, 2025
Apr 27, 2021
Jul 14, 2021
May 6, 2021
Mar 7, 2024
Apr 27, 2021
Jun 1, 2021
Apr 27, 2021
Mar 1, 2024
Apr 27, 2021
Apr 27, 2021
Mar 1, 2024
Apr 12, 2025
Apr 27, 2021
Apr 27, 2021
Apr 12, 2025

Repository files navigation

Iterator next function for JavaScript. See docs.

⚠️ 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

License Version Tests Dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size