es-toolkit 1.50.0-dev.2058 → 1.50.0-dev.2059
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 +3 -3
- package/dist/compat/array/drop.d.mts +1 -1
- package/dist/compat/array/drop.d.ts +1 -1
- package/dist/compat/array/pull.js +1 -1
- package/dist/compat/array/pull.mjs +1 -1
- package/dist/compat/array/remove.js +8 -4
- package/dist/compat/array/remove.mjs +8 -4
- package/dist/compat/array/unzipWith.js +1 -1
- package/dist/compat/array/unzipWith.mjs +1 -1
- package/dist/compat/function/curry.d.mts +1 -1
- package/dist/compat/function/curry.d.ts +1 -1
- package/dist/compat/function/flowRight.d.mts +1 -1
- package/dist/compat/function/flowRight.d.ts +1 -1
- package/dist/compat/function/partial.d.mts +1 -1
- package/dist/compat/function/partial.d.ts +1 -1
- package/dist/compat/function/rest.d.mts +1 -1
- package/dist/compat/function/rest.d.ts +1 -1
- package/dist/compat/function/rest.js +1 -1
- package/dist/compat/function/rest.mjs +1 -1
- package/dist/compat/object/cloneDeep.d.mts +5 -5
- package/dist/compat/object/cloneDeep.d.ts +5 -5
- package/dist/compat/object/cloneDeep.js +5 -5
- package/dist/compat/object/cloneDeep.mjs +5 -5
- package/dist/compat/object/cloneDeepWith.js +3 -1
- package/dist/compat/object/cloneDeepWith.mjs +3 -1
- package/dist/compat/object/cloneWith.d.mts +1 -1
- package/dist/compat/object/cloneWith.d.ts +1 -1
- package/dist/compat/object/cloneWith.js +1 -1
- package/dist/compat/object/cloneWith.mjs +1 -1
- package/dist/compat/object/transform.js +1 -1
- package/dist/compat/object/transform.mjs +1 -1
- package/dist/compat/string/words.js +17 -13
- package/dist/compat/string/words.mjs +17 -13
- package/dist/compat/util/toArray.d.mts +5 -5
- package/dist/compat/util/toArray.d.ts +5 -5
- package/dist/compat/util/toArray.js +4 -4
- package/dist/compat/util/toArray.mjs +4 -4
- package/dist/function/memoize.d.mts +3 -2
- package/dist/function/memoize.d.ts +3 -2
- package/dist/function/memoize.js +3 -2
- package/dist/function/memoize.mjs +3 -2
- package/dist/function/partial.d.mts +2 -2
- package/dist/function/partial.d.ts +2 -2
- package/dist/function/partialRight.d.mts +5 -5
- package/dist/function/partialRight.d.ts +5 -5
- package/dist/function/rest.d.mts +1 -1
- package/dist/function/rest.d.ts +1 -1
- package/dist/function/rest.js +1 -1
- package/dist/function/rest.mjs +1 -1
- package/dist/object/cloneDeepWith.d.mts +3 -1
- package/dist/object/cloneDeepWith.d.ts +3 -1
- package/dist/object/cloneDeepWith.js +3 -1
- package/dist/object/cloneDeepWith.mjs +3 -1
- package/package.json +5 -2
package/dist/function/rest.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* // Using start index 1
|
|
26
26
|
* const transformedFnWithStart = rest(fn, 1);
|
|
27
|
-
* console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4]]
|
|
27
|
+
* console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4], undefined]
|
|
28
28
|
*
|
|
29
29
|
* // With fewer arguments than the start index
|
|
30
30
|
* console.log(transformedFn(1)); // [1, undefined, []]
|
package/dist/function/rest.mjs
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* // Using start index 1
|
|
26
26
|
* const transformedFnWithStart = rest(fn, 1);
|
|
27
|
-
* console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4]]
|
|
27
|
+
* console.log(transformedFnWithStart(1, 2, 3, 4)); // [1, [2, 3, 4], undefined]
|
|
28
28
|
*
|
|
29
29
|
* // With fewer arguments than the start index
|
|
30
30
|
* console.log(transformedFn(1)); // [1, undefined, []]
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
* // Clone an array with a customizer
|
|
35
35
|
* const arr = [1, 2, 3];
|
|
36
36
|
* const clonedArr = cloneDeepWith(arr, (value) => {
|
|
37
|
-
*
|
|
37
|
+
* if (typeof value === 'number') {
|
|
38
|
+
* return value + 1; // Increment each number
|
|
39
|
+
* }
|
|
38
40
|
* });
|
|
39
41
|
* console.log(clonedArr); // [2, 3, 4]
|
|
40
42
|
* console.log(clonedArr === arr); // false
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
* // Clone an array with a customizer
|
|
35
35
|
* const arr = [1, 2, 3];
|
|
36
36
|
* const clonedArr = cloneDeepWith(arr, (value) => {
|
|
37
|
-
*
|
|
37
|
+
* if (typeof value === 'number') {
|
|
38
|
+
* return value + 1; // Increment each number
|
|
39
|
+
* }
|
|
38
40
|
* });
|
|
39
41
|
* console.log(clonedArr); // [2, 3, 4]
|
|
40
42
|
* console.log(clonedArr === arr); // false
|
|
@@ -40,7 +40,9 @@ const require_isBuffer = require("../predicate/isBuffer.js");
|
|
|
40
40
|
* // Clone an array with a customizer
|
|
41
41
|
* const arr = [1, 2, 3];
|
|
42
42
|
* const clonedArr = cloneDeepWith(arr, (value) => {
|
|
43
|
-
*
|
|
43
|
+
* if (typeof value === 'number') {
|
|
44
|
+
* return value + 1; // Increment each number
|
|
45
|
+
* }
|
|
44
46
|
* });
|
|
45
47
|
* console.log(clonedArr); // [2, 3, 4]
|
|
46
48
|
* console.log(clonedArr === arr); // false
|
|
@@ -40,7 +40,9 @@ import { isBuffer } from "../predicate/isBuffer.mjs";
|
|
|
40
40
|
* // Clone an array with a customizer
|
|
41
41
|
* const arr = [1, 2, 3];
|
|
42
42
|
* const clonedArr = cloneDeepWith(arr, (value) => {
|
|
43
|
-
*
|
|
43
|
+
* if (typeof value === 'number') {
|
|
44
|
+
* return value + 1; // Increment each number
|
|
45
|
+
* }
|
|
44
46
|
* });
|
|
45
47
|
* console.log(clonedArr); // [2, 3, 4]
|
|
46
48
|
* console.log(clonedArr === arr); // false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
|
-
"version": "1.50.0-dev.
|
|
3
|
+
"version": "1.50.0-dev.2059+87fc74fc",
|
|
4
4
|
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
|
|
5
5
|
"homepage": "https://es-toolkit.dev",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
@@ -218,7 +218,8 @@
|
|
|
218
218
|
"workspaces": [
|
|
219
219
|
"docs",
|
|
220
220
|
"benchmarks",
|
|
221
|
-
"tests/types"
|
|
221
|
+
"tests/types",
|
|
222
|
+
"tests/browser-compat"
|
|
222
223
|
],
|
|
223
224
|
"scripts": {
|
|
224
225
|
"bench": "yarn workspace benchmarks bench",
|
|
@@ -250,6 +251,8 @@
|
|
|
250
251
|
"broken-link-checker": "0.7.8",
|
|
251
252
|
"eslint": "^9.39.2",
|
|
252
253
|
"eslint-config-prettier": "^9.1.0",
|
|
254
|
+
"eslint-plugin-compat": "^7.0.2",
|
|
255
|
+
"eslint-plugin-es-x": "^10.0.0",
|
|
253
256
|
"eslint-plugin-no-for-of-array": "^0.0.1",
|
|
254
257
|
"eslint-plugin-prettier": "^5.2.1",
|
|
255
258
|
"eslint-plugin-vue": "^9.28.0",
|