1 | import index from './index!';
|
2 | /**
|
3 | * Gets index range of part of array.
|
4 | * @param x an array
|
5 | * @param i start index (-ve: from right) (0)
|
6 | * @param I end index (-ve: from right) (X)
|
7 | * @returns [start index, end index]
|
8 | */
|
9 | function indexRange(x, i = 0, I = x.length) {
|
10 | i = index(x, i);
|
11 | I = Math.max(i, index(x, I));
|
12 | return [i, I];
|
13 | }
|
14 | export default indexRange;
|
15 | //# sourceMappingURL=indexRange.js.map |
\ | No newline at end of file |