mirror of
https://github.com/toss/es-toolkit.git
synced 2025-01-05 23:43:29 +03:00
test(range): Remove unncessary fallback value
This commit is contained in:
parent
73cd00ecb7
commit
ed145c509d
@ -42,7 +42,7 @@ export function range(start: number, end?: number, step?: number): number[] {
|
||||
throw new Error(`The step value must be a non-zero integer.`);
|
||||
}
|
||||
|
||||
const length = Math.max(Math.ceil((end - start) / (step || 1)), 0);
|
||||
const length = Math.max(Math.ceil((end - start) / step), 0);
|
||||
const result = new Array(length);
|
||||
|
||||
for (let i = 0; i < length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user