import { IndexRange } from "https://deno.land/x/rimbu@1.0.0/common/internal.ts";
const { getIndicesFor } = IndexRange;
Returns, given the range
IndexRange
, and a target maximum length
, the actual index range.
This can be one of three options:
- 'empty': there are no elements within the range
- 'all': all elements are within the range
- [start: number, end: number]: an inclusive range of element indices within the given range
Parameters
range: IndexRange
- the
IndexRange
to use