Spaces:
Paused
Paused
Download node_modules/@huggingface/hub/src/utils/range.ts from Leon4gr45/nova-header-nav: direct link, hf CLI and curl.
- Browser
- Download file 332 Bytes
-
https://huggingface.co/spaces/Leon4gr45/nova-header-nav/resolve/main/node_modules/%40huggingface/hub/src/utils/range.ts
- Command line
-
hf download hf://spaces/Leon4gr45/nova-header-nav/node_modules/@huggingface/hub/src/utils/range.ts
-
curl -L -o range.ts https://huggingface.co/spaces/Leon4gr45/nova-header-nav/resolve/main/node_modules/%40huggingface/hub/src/utils/range.ts
332 Bytes
| /** | |
| * One param: create list of integers from 0 (inclusive) to n (exclusive) | |
| * Two params: create list of integers from a (inclusive) to b (exclusive) | |
| */ | |
| export function range(n: number, b?: number): number[] { | |
| return b | |
| ? Array(b - n) | |
| .fill(0) | |
| .map((_, i) => n + i) | |
| : Array(n) | |
| .fill(0) | |
| .map((_, i) => i); | |
| } | |