Skip to content

iterable-iterator/select

Repository files navigation

Iterable item selection for JavaScript. See docs.

⚠️ Depending on your environment, the code may require regeneratorRuntime to be defined, for instance by importing regenerator-runtime/runtime.

import {first, last, nth} from '@iterable-iterator/select';
import {range} from '@iterable-iterator/range';
first(range(10)); // 0
last(range(10)); // 9
nth(range(10), 0); // 0
nth(range(10), -1); // 9
nth(range(10), -3); // 7

License Version Tests Dependencies GitHub issues Downloads

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