es-toolkit 1.25.2-dev.809 → 1.25.2-dev.810
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/compat/array/every.d.mts +2 -2
- package/dist/compat/array/every.d.ts +2 -2
- package/dist/compat/array/filter.d.mts +2 -2
- package/dist/compat/array/filter.d.ts +2 -2
- package/dist/compat/array/find.d.mts +2 -2
- package/dist/compat/array/find.d.ts +2 -2
- package/package.json +1 -1
|
@@ -110,7 +110,7 @@ declare function every<T extends Record<string, unknown>>(object: T | null | und
|
|
|
110
110
|
*
|
|
111
111
|
* @template T
|
|
112
112
|
* @param {T | null | undefined} object - The object to check through.
|
|
113
|
-
* @param {[keyof T, unknown]} doesMatchProperty - An array where the first element is the property key and the second element is the value to match.
|
|
113
|
+
* @param {[keyof T[keyof T], unknown]} doesMatchProperty - An array where the first element is the property key and the second element is the value to match.
|
|
114
114
|
* @returns {boolean} - `true` if every item has the specified property value, or `false` if at least one item does not match.
|
|
115
115
|
*
|
|
116
116
|
* @example
|
|
@@ -119,7 +119,7 @@ declare function every<T extends Record<string, unknown>>(object: T | null | und
|
|
|
119
119
|
* const result = every(obj, ['name', 'Alice']);
|
|
120
120
|
* console.log(result); // false
|
|
121
121
|
*/
|
|
122
|
-
declare function every<T extends Record<string, unknown>>(object: T | null | undefined, doesMatchProperty: [keyof T, unknown]): boolean;
|
|
122
|
+
declare function every<T extends Record<string, unknown>>(object: T | null | undefined, doesMatchProperty: [keyof T[keyof T], unknown]): boolean;
|
|
123
123
|
/**
|
|
124
124
|
* Checks if every item in an object has a specific property, where the property name is provided as a string.
|
|
125
125
|
*
|
|
@@ -110,7 +110,7 @@ declare function every<T extends Record<string, unknown>>(object: T | null | und
|
|
|
110
110
|
*
|
|
111
111
|
* @template T
|
|
112
112
|
* @param {T | null | undefined} object - The object to check through.
|
|
113
|
-
* @param {[keyof T, unknown]} doesMatchProperty - An array where the first element is the property key and the second element is the value to match.
|
|
113
|
+
* @param {[keyof T[keyof T], unknown]} doesMatchProperty - An array where the first element is the property key and the second element is the value to match.
|
|
114
114
|
* @returns {boolean} - `true` if every item has the specified property value, or `false` if at least one item does not match.
|
|
115
115
|
*
|
|
116
116
|
* @example
|
|
@@ -119,7 +119,7 @@ declare function every<T extends Record<string, unknown>>(object: T | null | und
|
|
|
119
119
|
* const result = every(obj, ['name', 'Alice']);
|
|
120
120
|
* console.log(result); // false
|
|
121
121
|
*/
|
|
122
|
-
declare function every<T extends Record<string, unknown>>(object: T | null | undefined, doesMatchProperty: [keyof T, unknown]): boolean;
|
|
122
|
+
declare function every<T extends Record<string, unknown>>(object: T | null | undefined, doesMatchProperty: [keyof T[keyof T], unknown]): boolean;
|
|
123
123
|
/**
|
|
124
124
|
* Checks if every item in an object has a specific property, where the property name is provided as a string.
|
|
125
125
|
*
|
|
@@ -90,7 +90,7 @@ declare function filter<T extends Record<string, unknown>>(object: T | null | un
|
|
|
90
90
|
*
|
|
91
91
|
* @template T
|
|
92
92
|
* @param {T | null | undefined} object - The object to iterate over.
|
|
93
|
-
* @param {[keyof T, unknown]} doesMatchProperty - The key-value pair to match.
|
|
93
|
+
* @param {[keyof T[keyof T], unknown]} doesMatchProperty - The key-value pair to match.
|
|
94
94
|
* @returns {T[]} - Returns a new array of elements that match the given key-value pair.
|
|
95
95
|
*
|
|
96
96
|
* @example
|
|
@@ -98,7 +98,7 @@ declare function filter<T extends Record<string, unknown>>(object: T | null | un
|
|
|
98
98
|
* filter(obj, ['name', 'Alice']);
|
|
99
99
|
* // => [{ id: 1, name: 'Alice' }]
|
|
100
100
|
*/
|
|
101
|
-
declare function filter<T extends Record<string, unknown>>(object: T | null | undefined, doesMatchProperty: [keyof T, unknown]): T[];
|
|
101
|
+
declare function filter<T extends Record<string, unknown>>(object: T | null | undefined, doesMatchProperty: [keyof T[keyof T], unknown]): T[];
|
|
102
102
|
/**
|
|
103
103
|
* Filters the object, returning elements that contain the given property name.
|
|
104
104
|
*
|
|
@@ -90,7 +90,7 @@ declare function filter<T extends Record<string, unknown>>(object: T | null | un
|
|
|
90
90
|
*
|
|
91
91
|
* @template T
|
|
92
92
|
* @param {T | null | undefined} object - The object to iterate over.
|
|
93
|
-
* @param {[keyof T, unknown]} doesMatchProperty - The key-value pair to match.
|
|
93
|
+
* @param {[keyof T[keyof T], unknown]} doesMatchProperty - The key-value pair to match.
|
|
94
94
|
* @returns {T[]} - Returns a new array of elements that match the given key-value pair.
|
|
95
95
|
*
|
|
96
96
|
* @example
|
|
@@ -98,7 +98,7 @@ declare function filter<T extends Record<string, unknown>>(object: T | null | un
|
|
|
98
98
|
* filter(obj, ['name', 'Alice']);
|
|
99
99
|
* // => [{ id: 1, name: 'Alice' }]
|
|
100
100
|
*/
|
|
101
|
-
declare function filter<T extends Record<string, unknown>>(object: T | null | undefined, doesMatchProperty: [keyof T, unknown]): T[];
|
|
101
|
+
declare function filter<T extends Record<string, unknown>>(object: T | null | undefined, doesMatchProperty: [keyof T[keyof T], unknown]): T[];
|
|
102
102
|
/**
|
|
103
103
|
* Filters the object, returning elements that contain the given property name.
|
|
104
104
|
*
|
|
@@ -93,7 +93,7 @@ declare function find<T extends Record<string, unknown>>(object: T | null | unde
|
|
|
93
93
|
*
|
|
94
94
|
* @template T
|
|
95
95
|
* @param {T | null | undefined} object - The object to search through.
|
|
96
|
-
* @param {[keyof T, unknown]} doesMatchProperty - An array where the first element is the property key and the second element is the value to match.
|
|
96
|
+
* @param {[keyof T[keyof T], unknown]} doesMatchProperty - An array where the first element is the property key and the second element is the value to match.
|
|
97
97
|
* @returns {T | undefined} - The first item that has the specified property value, or `undefined` if no match is found.
|
|
98
98
|
*
|
|
99
99
|
* @example
|
|
@@ -102,7 +102,7 @@ declare function find<T extends Record<string, unknown>>(object: T | null | unde
|
|
|
102
102
|
* const result = find(items, ['name', 'Alice']);
|
|
103
103
|
* console.log(result); // { id: 1, name: 'Alice' }
|
|
104
104
|
*/
|
|
105
|
-
declare function find<T extends Record<string, unknown>>(object: T | null | undefined, doesMatchProperty: [keyof T, unknown]): T | undefined;
|
|
105
|
+
declare function find<T extends Record<string, unknown>>(object: T | null | undefined, doesMatchProperty: [keyof T[keyof T], unknown]): T | undefined;
|
|
106
106
|
/**
|
|
107
107
|
* Finds the first item in an object that has a specific property, where the property name is provided as a string.
|
|
108
108
|
*
|
|
@@ -93,7 +93,7 @@ declare function find<T extends Record<string, unknown>>(object: T | null | unde
|
|
|
93
93
|
*
|
|
94
94
|
* @template T
|
|
95
95
|
* @param {T | null | undefined} object - The object to search through.
|
|
96
|
-
* @param {[keyof T, unknown]} doesMatchProperty - An array where the first element is the property key and the second element is the value to match.
|
|
96
|
+
* @param {[keyof T[keyof T], unknown]} doesMatchProperty - An array where the first element is the property key and the second element is the value to match.
|
|
97
97
|
* @returns {T | undefined} - The first item that has the specified property value, or `undefined` if no match is found.
|
|
98
98
|
*
|
|
99
99
|
* @example
|
|
@@ -102,7 +102,7 @@ declare function find<T extends Record<string, unknown>>(object: T | null | unde
|
|
|
102
102
|
* const result = find(items, ['name', 'Alice']);
|
|
103
103
|
* console.log(result); // { id: 1, name: 'Alice' }
|
|
104
104
|
*/
|
|
105
|
-
declare function find<T extends Record<string, unknown>>(object: T | null | undefined, doesMatchProperty: [keyof T, unknown]): T | undefined;
|
|
105
|
+
declare function find<T extends Record<string, unknown>>(object: T | null | undefined, doesMatchProperty: [keyof T[keyof T], unknown]): T | undefined;
|
|
106
106
|
/**
|
|
107
107
|
* Finds the first item in an object that has a specific property, where the property name is provided as a string.
|
|
108
108
|
*
|
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.25.2-dev.
|
|
4
|
+
"version": "1.25.2-dev.810+4a8ea44e",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|