es-toolkit 1.45.1-dev.1770 → 1.45.1-dev.1772
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/array/fill.d.mts +12 -15
- package/dist/array/fill.d.ts +12 -15
- package/dist/compat/array/dropWhile.d.mts +2 -2
- package/dist/compat/array/dropWhile.d.ts +2 -2
- package/dist/compat/array/lastIndexOf.d.mts +1 -1
- package/dist/compat/array/lastIndexOf.d.ts +1 -1
- package/dist/compat/array/sortedLastIndex.d.mts +1 -1
- package/dist/compat/array/sortedLastIndex.d.ts +1 -1
- package/dist/compat/object/setWith.d.mts +2 -2
- package/dist/compat/object/setWith.d.ts +2 -2
- package/dist/compat/util/over.d.mts +1 -1
- package/dist/compat/util/over.d.ts +1 -1
- package/dist/function/memoize.d.mts +1 -1
- package/dist/function/memoize.d.ts +1 -1
- package/package.json +1 -1
package/dist/array/fill.d.mts
CHANGED
|
@@ -11,17 +11,16 @@
|
|
|
11
11
|
* @returns {T[]} The array with the filled values.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
|
-
*
|
|
15
|
-
* const result = fill(array, 'a');
|
|
14
|
+
* fill([1, 2, 3], 'a');
|
|
16
15
|
* // => ['a', 'a', 'a']
|
|
17
16
|
*
|
|
18
|
-
*
|
|
17
|
+
* fill(Array(3), 2);
|
|
19
18
|
* // => [2, 2, 2]
|
|
20
19
|
*
|
|
21
|
-
*
|
|
20
|
+
* fill([4, 6, 8, 10], '*', 1, 3);
|
|
22
21
|
* // => [4, '*', '*', 10]
|
|
23
22
|
*
|
|
24
|
-
*
|
|
23
|
+
* fill([1, 2, 3], '*', -2, -1);
|
|
25
24
|
* // => [1, '*', 3]
|
|
26
25
|
*/
|
|
27
26
|
declare function fill<T>(array: unknown[], value: T): T[];
|
|
@@ -40,17 +39,16 @@ declare function fill<T>(array: unknown[], value: T): T[];
|
|
|
40
39
|
* @returns {Array<T | U>} The array with the filled values.
|
|
41
40
|
*
|
|
42
41
|
* @example
|
|
43
|
-
*
|
|
44
|
-
* const result = fill(array, 'a');
|
|
42
|
+
* fill([1, 2, 3], 'a');
|
|
45
43
|
* // => ['a', 'a', 'a']
|
|
46
44
|
*
|
|
47
|
-
*
|
|
45
|
+
* fill(Array(3), 2);
|
|
48
46
|
* // => [2, 2, 2]
|
|
49
47
|
*
|
|
50
|
-
*
|
|
48
|
+
* fill([4, 6, 8, 10], '*', 1, 3);
|
|
51
49
|
* // => [4, '*', '*', 10]
|
|
52
50
|
*
|
|
53
|
-
*
|
|
51
|
+
* fill([1, 2, 3], '*', -2, -1);
|
|
54
52
|
* // => [1, '*', 3]
|
|
55
53
|
*/
|
|
56
54
|
declare function fill<T, U>(array: Array<T | U>, value: U, start: number): Array<T | U>;
|
|
@@ -70,17 +68,16 @@ declare function fill<T, U>(array: Array<T | U>, value: U, start: number): Array
|
|
|
70
68
|
* @returns {Array<T | U>} The array with the filled values.
|
|
71
69
|
*
|
|
72
70
|
* @example
|
|
73
|
-
*
|
|
74
|
-
* const result = fill(array, 'a');
|
|
71
|
+
* fill([1, 2, 3], 'a');
|
|
75
72
|
* // => ['a', 'a', 'a']
|
|
76
73
|
*
|
|
77
|
-
*
|
|
74
|
+
* fill(Array(3), 2);
|
|
78
75
|
* // => [2, 2, 2]
|
|
79
76
|
*
|
|
80
|
-
*
|
|
77
|
+
* fill([4, 6, 8, 10], '*', 1, 3);
|
|
81
78
|
* // => [4, '*', '*', 10]
|
|
82
79
|
*
|
|
83
|
-
*
|
|
80
|
+
* fill([1, 2, 3], '*', -2, -1);
|
|
84
81
|
* // => [1, '*', 3]
|
|
85
82
|
*/
|
|
86
83
|
declare function fill<T, U>(array: Array<T | U>, value: U, start: number, end: number): Array<T | U>;
|
package/dist/array/fill.d.ts
CHANGED
|
@@ -11,17 +11,16 @@
|
|
|
11
11
|
* @returns {T[]} The array with the filled values.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
|
-
*
|
|
15
|
-
* const result = fill(array, 'a');
|
|
14
|
+
* fill([1, 2, 3], 'a');
|
|
16
15
|
* // => ['a', 'a', 'a']
|
|
17
16
|
*
|
|
18
|
-
*
|
|
17
|
+
* fill(Array(3), 2);
|
|
19
18
|
* // => [2, 2, 2]
|
|
20
19
|
*
|
|
21
|
-
*
|
|
20
|
+
* fill([4, 6, 8, 10], '*', 1, 3);
|
|
22
21
|
* // => [4, '*', '*', 10]
|
|
23
22
|
*
|
|
24
|
-
*
|
|
23
|
+
* fill([1, 2, 3], '*', -2, -1);
|
|
25
24
|
* // => [1, '*', 3]
|
|
26
25
|
*/
|
|
27
26
|
declare function fill<T>(array: unknown[], value: T): T[];
|
|
@@ -40,17 +39,16 @@ declare function fill<T>(array: unknown[], value: T): T[];
|
|
|
40
39
|
* @returns {Array<T | U>} The array with the filled values.
|
|
41
40
|
*
|
|
42
41
|
* @example
|
|
43
|
-
*
|
|
44
|
-
* const result = fill(array, 'a');
|
|
42
|
+
* fill([1, 2, 3], 'a');
|
|
45
43
|
* // => ['a', 'a', 'a']
|
|
46
44
|
*
|
|
47
|
-
*
|
|
45
|
+
* fill(Array(3), 2);
|
|
48
46
|
* // => [2, 2, 2]
|
|
49
47
|
*
|
|
50
|
-
*
|
|
48
|
+
* fill([4, 6, 8, 10], '*', 1, 3);
|
|
51
49
|
* // => [4, '*', '*', 10]
|
|
52
50
|
*
|
|
53
|
-
*
|
|
51
|
+
* fill([1, 2, 3], '*', -2, -1);
|
|
54
52
|
* // => [1, '*', 3]
|
|
55
53
|
*/
|
|
56
54
|
declare function fill<T, U>(array: Array<T | U>, value: U, start: number): Array<T | U>;
|
|
@@ -70,17 +68,16 @@ declare function fill<T, U>(array: Array<T | U>, value: U, start: number): Array
|
|
|
70
68
|
* @returns {Array<T | U>} The array with the filled values.
|
|
71
69
|
*
|
|
72
70
|
* @example
|
|
73
|
-
*
|
|
74
|
-
* const result = fill(array, 'a');
|
|
71
|
+
* fill([1, 2, 3], 'a');
|
|
75
72
|
* // => ['a', 'a', 'a']
|
|
76
73
|
*
|
|
77
|
-
*
|
|
74
|
+
* fill(Array(3), 2);
|
|
78
75
|
* // => [2, 2, 2]
|
|
79
76
|
*
|
|
80
|
-
*
|
|
77
|
+
* fill([4, 6, 8, 10], '*', 1, 3);
|
|
81
78
|
* // => [4, '*', '*', 10]
|
|
82
79
|
*
|
|
83
|
-
*
|
|
80
|
+
* fill([1, 2, 3], '*', -2, -1);
|
|
84
81
|
* // => [1, '*', 3]
|
|
85
82
|
*/
|
|
86
83
|
declare function fill<T, U>(array: Array<T | U>, value: U, start: number, end: number): Array<T | U>;
|
|
@@ -15,10 +15,10 @@ import { ListIteratee } from '../_internal/ListIteratee.mjs';
|
|
|
15
15
|
* // => [3]
|
|
16
16
|
*
|
|
17
17
|
* dropWhile([{ a: 1, b: 2 }, { a: 1, b: 3 }], { a: 1 })
|
|
18
|
-
* // => [
|
|
18
|
+
* // => []
|
|
19
19
|
*
|
|
20
20
|
* dropWhile([{ a: 1, b: 2 }, { a: 1, b: 3 }], ['a', 1])
|
|
21
|
-
* // => [
|
|
21
|
+
* // => []
|
|
22
22
|
*
|
|
23
23
|
* dropWhile([{ a: 1, b: 2 }, { a: 1, b: 3 }], 'a')
|
|
24
24
|
* // => []
|
|
@@ -15,10 +15,10 @@ import { ListIteratee } from '../_internal/ListIteratee.js';
|
|
|
15
15
|
* // => [3]
|
|
16
16
|
*
|
|
17
17
|
* dropWhile([{ a: 1, b: 2 }, { a: 1, b: 3 }], { a: 1 })
|
|
18
|
-
* // => [
|
|
18
|
+
* // => []
|
|
19
19
|
*
|
|
20
20
|
* dropWhile([{ a: 1, b: 2 }, { a: 1, b: 3 }], ['a', 1])
|
|
21
|
-
* // => [
|
|
21
|
+
* // => []
|
|
22
22
|
*
|
|
23
23
|
* dropWhile([{ a: 1, b: 2 }, { a: 1, b: 3 }], 'a')
|
|
24
24
|
* // => []
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @returns {number} Returns the index at which `value` should be inserted
|
|
9
9
|
* into `array`.
|
|
10
10
|
* @example
|
|
11
|
-
*
|
|
11
|
+
* sortedLastIndex([4, 5, 5, 5, 6], 5)
|
|
12
12
|
* // => 4
|
|
13
13
|
*/
|
|
14
14
|
declare function sortedLastIndex<T>(array: ArrayLike<T> | null | undefined, value: T): number;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @returns {number} Returns the index at which `value` should be inserted
|
|
9
9
|
* into `array`.
|
|
10
10
|
* @example
|
|
11
|
-
*
|
|
11
|
+
* sortedLastIndex([4, 5, 5, 5, 6], 5)
|
|
12
12
|
* // => 4
|
|
13
13
|
*/
|
|
14
14
|
declare function sortedLastIndex<T>(array: ArrayLike<T> | null | undefined, value: T): number;
|
|
@@ -20,7 +20,7 @@ import { PropertyPath } from '../_internal/PropertyPath.mjs';
|
|
|
20
20
|
* // Set a value with a customizer that creates arrays for numeric path segments
|
|
21
21
|
* const object = {};
|
|
22
22
|
* setWith(object, '[0][1]', 'a', (value) => Array.isArray(value) ? value : []);
|
|
23
|
-
* // => { '0': ['a'] }
|
|
23
|
+
* // => { '0': [, 'a'] }
|
|
24
24
|
*/
|
|
25
25
|
declare function setWith<T extends object>(object: T, path: PropertyPath, value: any, customizer?: (nsValue: any, key: string, nsObject: T) => any): T;
|
|
26
26
|
/**
|
|
@@ -44,7 +44,7 @@ declare function setWith<T extends object>(object: T, path: PropertyPath, value:
|
|
|
44
44
|
* // Set a value with a customizer that creates arrays for numeric path segments
|
|
45
45
|
* const object = {};
|
|
46
46
|
* setWith(object, '[0][1]', 'a', (value) => Array.isArray(value) ? value : []);
|
|
47
|
-
* // => { '0': ['a'] }
|
|
47
|
+
* // => { '0': [, 'a'] }
|
|
48
48
|
*/
|
|
49
49
|
declare function setWith<T extends object, R>(object: T, path: PropertyPath, value: any, customizer?: (nsValue: any, key: string, nsObject: T) => any): R;
|
|
50
50
|
|
|
@@ -20,7 +20,7 @@ import { PropertyPath } from '../_internal/PropertyPath.js';
|
|
|
20
20
|
* // Set a value with a customizer that creates arrays for numeric path segments
|
|
21
21
|
* const object = {};
|
|
22
22
|
* setWith(object, '[0][1]', 'a', (value) => Array.isArray(value) ? value : []);
|
|
23
|
-
* // => { '0': ['a'] }
|
|
23
|
+
* // => { '0': [, 'a'] }
|
|
24
24
|
*/
|
|
25
25
|
declare function setWith<T extends object>(object: T, path: PropertyPath, value: any, customizer?: (nsValue: any, key: string, nsObject: T) => any): T;
|
|
26
26
|
/**
|
|
@@ -44,7 +44,7 @@ declare function setWith<T extends object>(object: T, path: PropertyPath, value:
|
|
|
44
44
|
* // Set a value with a customizer that creates arrays for numeric path segments
|
|
45
45
|
* const object = {};
|
|
46
46
|
* setWith(object, '[0][1]', 'a', (value) => Array.isArray(value) ? value : []);
|
|
47
|
-
* // => { '0': ['a'] }
|
|
47
|
+
* // => { '0': [, 'a'] }
|
|
48
48
|
*/
|
|
49
49
|
declare function setWith<T extends object, R>(object: T, path: PropertyPath, value: any, customizer?: (nsValue: any, key: string, nsObject: T) => any): R;
|
|
50
50
|
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
* const memoizedSumWithCustomCache = memoize(sum, { cache: customCache });
|
|
69
69
|
* console.log(memoizedSumWithCustomCache([1, 2])); // 3
|
|
70
70
|
* console.log(memoizedSumWithCustomCache([1, 2])); // 3 (cached result)
|
|
71
|
-
* console.log(
|
|
71
|
+
* console.log(memoizedSumWithCustomCache.cache.size); // 1
|
|
72
72
|
*/
|
|
73
73
|
declare function memoize<F extends (...args: any) => any>(fn: F, options?: {
|
|
74
74
|
cache?: MemoizeCache<any, ReturnType<F>>;
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
* const memoizedSumWithCustomCache = memoize(sum, { cache: customCache });
|
|
69
69
|
* console.log(memoizedSumWithCustomCache([1, 2])); // 3
|
|
70
70
|
* console.log(memoizedSumWithCustomCache([1, 2])); // 3 (cached result)
|
|
71
|
-
* console.log(
|
|
71
|
+
* console.log(memoizedSumWithCustomCache.cache.size); // 1
|
|
72
72
|
*/
|
|
73
73
|
declare function memoize<F extends (...args: any) => any>(fn: F, options?: {
|
|
74
74
|
cache?: MemoizeCache<any, ReturnType<F>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
|
-
"version": "1.45.1-dev.
|
|
3
|
+
"version": "1.45.1-dev.1772+2f8f85fb",
|
|
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",
|