Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 2.45 KB

README.md

File metadata and controls

33 lines (28 loc) · 2.45 KB

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