UNPKG
@prelude/array
Version:
latest (3.0.0)
3.0.0
2.3.1
2.3.0
2.2.0
2.1.0
2.0.0
1.0.0
0.3.2
0.3.1
0.3.0
0.2.0
0.1.2
0.1.1
0.1.0
0.0.1
Array module.
@prelude/array
/
cjs
/
modulo.d.ts
7 lines
(6 loc)
•
211 B
TypeScript
View Raw
1
2
3
4
5
6
7
/** * Like `at` but wraps using modulo on length. *
@throws
{
TypeError
} if array is empty or index is not a safe integer. */
declare
const
modulo
: <T>
(
values
: T[],
index
:
number
) =>
T;
export
default
modulo;