UNPKG

341 BJavaScriptView Raw
1import indexRange from './indexRange';
2/**
3 * Counts the number of values.
4 * @param x an array
5 * @param i start index (-ve: from right) (0)
6 * @param I end index (-ve: from right) (X)
7 */
8function size(x, i = 0, I = x.length) {
9 var [i, I] = indexRange(x, i, I);
10 return I - i;
11}
12export default size;
13//# sourceMappingURL=size.js.map
\No newline at end of file