es-toolkit 1.20.0-dev.638 → 1.20.0-dev.640
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.global.js.map +1 -1
- package/dist/math/range.d.mts +7 -25
- package/dist/math/range.d.ts +7 -25
- package/package.json +1 -1
package/dist/math/range.d.mts
CHANGED
|
@@ -1,38 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Returns an array of numbers from `
|
|
2
|
+
* Returns an array of numbers from `0` (inclusive) to `end` (exclusive), incrementing by `1`.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @param {number} start - The starting number of the range (inclusive).
|
|
7
|
-
* @param {number} [end] - The end number of the range (exclusive).
|
|
8
|
-
* @param {number} [step] - The step value for the range. (default: 1)
|
|
9
|
-
* @returns {number[]} An array of numbers from `start` to `end` with the specified `step`.
|
|
4
|
+
* @param {number} end - The end number of the range (exclusive).
|
|
5
|
+
* @returns {number[]} An array of numbers from `0` (inclusive) to `end` (exclusive) with a step of `1`.
|
|
10
6
|
*
|
|
11
7
|
* @example
|
|
12
8
|
* // Returns [0, 1, 2, 3]
|
|
13
9
|
* range(4);
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* // Returns [0, 5, 10, 15]
|
|
17
|
-
* range(0, 20, 5);
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* // Returns [0, -1, -2, -3]
|
|
21
|
-
* range(0, -4, -1);
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* // Throws an error: The step value must be a non-zero integer.
|
|
25
|
-
* range(1, 4, 0);
|
|
26
10
|
*/
|
|
27
11
|
declare function range(end: number): number[];
|
|
28
12
|
/**
|
|
29
|
-
* Returns an array of numbers from `start` to `end
|
|
30
|
-
*
|
|
31
|
-
* If `step` is not provided, it defaults to `1`.
|
|
13
|
+
* Returns an array of numbers from `start` (inclusive) to `end` (exclusive), incrementing by `1`.
|
|
32
14
|
*
|
|
33
15
|
* @param {number} start - The starting number of the range (inclusive).
|
|
34
16
|
* @param {number} end - The end number of the range (exclusive).
|
|
35
|
-
* @returns {number[]} An array of numbers from `start` to `end` with
|
|
17
|
+
* @returns {number[]} An array of numbers from `start` (inclusive) to `end` (exclusive) with a step of `1`.
|
|
36
18
|
*
|
|
37
19
|
* @example
|
|
38
20
|
* // Returns [1, 2, 3]
|
|
@@ -40,12 +22,12 @@ declare function range(end: number): number[];
|
|
|
40
22
|
*/
|
|
41
23
|
declare function range(start: number, end: number): number[];
|
|
42
24
|
/**
|
|
43
|
-
* Returns an array of numbers from `start` to `end
|
|
25
|
+
* Returns an array of numbers from `start` (inclusive) to `end` (exclusive), incrementing by `step`.
|
|
44
26
|
*
|
|
45
27
|
* @param {number} start - The starting number of the range (inclusive).
|
|
46
28
|
* @param {number} end - The end number of the range (exclusive).
|
|
47
29
|
* @param {number} step - The step value for the range.
|
|
48
|
-
* @returns {number[]} An array of numbers from `start` to `end` with the specified `step`.
|
|
30
|
+
* @returns {number[]} An array of numbers from `start` (inclusive) to `end` (exclusive) with the specified `step`.
|
|
49
31
|
*
|
|
50
32
|
* @example
|
|
51
33
|
* // Returns [0, 5, 10, 15]
|
package/dist/math/range.d.ts
CHANGED
|
@@ -1,38 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Returns an array of numbers from `
|
|
2
|
+
* Returns an array of numbers from `0` (inclusive) to `end` (exclusive), incrementing by `1`.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @param {number} start - The starting number of the range (inclusive).
|
|
7
|
-
* @param {number} [end] - The end number of the range (exclusive).
|
|
8
|
-
* @param {number} [step] - The step value for the range. (default: 1)
|
|
9
|
-
* @returns {number[]} An array of numbers from `start` to `end` with the specified `step`.
|
|
4
|
+
* @param {number} end - The end number of the range (exclusive).
|
|
5
|
+
* @returns {number[]} An array of numbers from `0` (inclusive) to `end` (exclusive) with a step of `1`.
|
|
10
6
|
*
|
|
11
7
|
* @example
|
|
12
8
|
* // Returns [0, 1, 2, 3]
|
|
13
9
|
* range(4);
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* // Returns [0, 5, 10, 15]
|
|
17
|
-
* range(0, 20, 5);
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* // Returns [0, -1, -2, -3]
|
|
21
|
-
* range(0, -4, -1);
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* // Throws an error: The step value must be a non-zero integer.
|
|
25
|
-
* range(1, 4, 0);
|
|
26
10
|
*/
|
|
27
11
|
declare function range(end: number): number[];
|
|
28
12
|
/**
|
|
29
|
-
* Returns an array of numbers from `start` to `end
|
|
30
|
-
*
|
|
31
|
-
* If `step` is not provided, it defaults to `1`.
|
|
13
|
+
* Returns an array of numbers from `start` (inclusive) to `end` (exclusive), incrementing by `1`.
|
|
32
14
|
*
|
|
33
15
|
* @param {number} start - The starting number of the range (inclusive).
|
|
34
16
|
* @param {number} end - The end number of the range (exclusive).
|
|
35
|
-
* @returns {number[]} An array of numbers from `start` to `end` with
|
|
17
|
+
* @returns {number[]} An array of numbers from `start` (inclusive) to `end` (exclusive) with a step of `1`.
|
|
36
18
|
*
|
|
37
19
|
* @example
|
|
38
20
|
* // Returns [1, 2, 3]
|
|
@@ -40,12 +22,12 @@ declare function range(end: number): number[];
|
|
|
40
22
|
*/
|
|
41
23
|
declare function range(start: number, end: number): number[];
|
|
42
24
|
/**
|
|
43
|
-
* Returns an array of numbers from `start` to `end
|
|
25
|
+
* Returns an array of numbers from `start` (inclusive) to `end` (exclusive), incrementing by `step`.
|
|
44
26
|
*
|
|
45
27
|
* @param {number} start - The starting number of the range (inclusive).
|
|
46
28
|
* @param {number} end - The end number of the range (exclusive).
|
|
47
29
|
* @param {number} step - The step value for the range.
|
|
48
|
-
* @returns {number[]} An array of numbers from `start` to `end` with the specified `step`.
|
|
30
|
+
* @returns {number[]} An array of numbers from `start` (inclusive) to `end` (exclusive) with the specified `step`.
|
|
49
31
|
*
|
|
50
32
|
* @example
|
|
51
33
|
* // Returns [0, 5, 10, 15]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
3
|
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
|
|
4
|
-
"version": "1.20.0-dev.
|
|
4
|
+
"version": "1.20.0-dev.640+14700ece",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|