Function
range
(start: number, end?: number)
Source from the content-addressed store, hash-verified
| 93 | * @since 2.0.0 |
| 94 | */ |
| 95 | export const range = (start: number, end?: number): Iterable<number> => { |
| 96 | if (end === undefined) { |
| 97 | return makeBy((i) => start + i) |
| 98 | } |
| 99 | return makeBy((i) => start + i, { |
| 100 | length: start <= end ? end - start + 1 : 1 |
| 101 | }) |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Returns a `Iterable` containing a value repeated the specified number of times. |
Callers
nothing calls this directly
Tested by
no test coverage detected