Function
range
(start: number, end?: number)
Source from the content-addressed store, hash-verified
| 70 | * @since 2.0.0 |
| 71 | */ |
| 72 | export const range = (start: number, end?: number): Iterable<number> => { |
| 73 | if (end === undefined) { |
| 74 | return makeBy((i) => start + i) |
| 75 | } |
| 76 | return makeBy((i) => start + i, { |
| 77 | length: start <= end ? end - start + 1 : 1 |
| 78 | }) |
| 79 | } |
| 80 | |
| 81 | /** |
| 82 | * Return a `Iterable` containing a value repeated the specified number of times. |
Callers
nothing calls this directly
Tested by
no test coverage detected