es-toolkit 1.25.2-dev.801 → 1.25.2-dev.802
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.
|
@@ -62,7 +62,7 @@ declare function find<T>(arr: ArrayLike<T> | null | undefined, propertyToCheck:
|
|
|
62
62
|
* Finds the first item in an object that matches the given predicate function.
|
|
63
63
|
*
|
|
64
64
|
* @template T
|
|
65
|
-
* @param {T
|
|
65
|
+
* @param {T | null | undefined} object - The object to search through.
|
|
66
66
|
* @param {(item: T[keyof T], index: number, arr: T) => unknown} doesMatch - A function that takes an item, its key, and the object, and returns a truthy value if the item matches the criteria.
|
|
67
67
|
* @returns {T | undefined} - The first property value that matches the predicate, or `undefined` if no match is found.
|
|
68
68
|
*
|
|
@@ -77,7 +77,7 @@ declare function find<T extends Record<string, unknown>>(object: T | null | unde
|
|
|
77
77
|
* Finds the first item in an object that matches the given partial value.
|
|
78
78
|
*
|
|
79
79
|
* @template T
|
|
80
|
-
* @param {T
|
|
80
|
+
* @param {T | null | undefined} object - The object to search through.
|
|
81
81
|
* @param {Partial<T[keyof T]>} doesMatch - A partial value to match against the values of the object.
|
|
82
82
|
* @returns {T | undefined} - The first property value that matches the partial value, or `undefined` if no match is found.
|
|
83
83
|
*
|
|
@@ -92,7 +92,7 @@ declare function find<T extends Record<string, unknown>>(object: T | null | unde
|
|
|
92
92
|
* Finds the first item in an object that matches a property with a specific value.
|
|
93
93
|
*
|
|
94
94
|
* @template T
|
|
95
|
-
* @param {T
|
|
95
|
+
* @param {T | null | undefined} object - The object to search through.
|
|
96
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.
|
|
97
97
|
* @returns {T | undefined} - The first item that has the specified property value, or `undefined` if no match is found.
|
|
98
98
|
*
|
|
@@ -107,7 +107,7 @@ declare function find<T extends Record<string, unknown>>(object: T | null | unde
|
|
|
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
|
*
|
|
109
109
|
* @template T
|
|
110
|
-
* @param {T
|
|
110
|
+
* @param {T | null | undefined} object - The object to search through.
|
|
111
111
|
* @param {string} propertyToCheck - The property name to check.
|
|
112
112
|
* @returns {T | undefined} - The first property value that has the specified property, or `undefined` if no match is found.
|
|
113
113
|
*
|
|
@@ -62,7 +62,7 @@ declare function find<T>(arr: ArrayLike<T> | null | undefined, propertyToCheck:
|
|
|
62
62
|
* Finds the first item in an object that matches the given predicate function.
|
|
63
63
|
*
|
|
64
64
|
* @template T
|
|
65
|
-
* @param {T
|
|
65
|
+
* @param {T | null | undefined} object - The object to search through.
|
|
66
66
|
* @param {(item: T[keyof T], index: number, arr: T) => unknown} doesMatch - A function that takes an item, its key, and the object, and returns a truthy value if the item matches the criteria.
|
|
67
67
|
* @returns {T | undefined} - The first property value that matches the predicate, or `undefined` if no match is found.
|
|
68
68
|
*
|
|
@@ -77,7 +77,7 @@ declare function find<T extends Record<string, unknown>>(object: T | null | unde
|
|
|
77
77
|
* Finds the first item in an object that matches the given partial value.
|
|
78
78
|
*
|
|
79
79
|
* @template T
|
|
80
|
-
* @param {T
|
|
80
|
+
* @param {T | null | undefined} object - The object to search through.
|
|
81
81
|
* @param {Partial<T[keyof T]>} doesMatch - A partial value to match against the values of the object.
|
|
82
82
|
* @returns {T | undefined} - The first property value that matches the partial value, or `undefined` if no match is found.
|
|
83
83
|
*
|
|
@@ -92,7 +92,7 @@ declare function find<T extends Record<string, unknown>>(object: T | null | unde
|
|
|
92
92
|
* Finds the first item in an object that matches a property with a specific value.
|
|
93
93
|
*
|
|
94
94
|
* @template T
|
|
95
|
-
* @param {T
|
|
95
|
+
* @param {T | null | undefined} object - The object to search through.
|
|
96
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.
|
|
97
97
|
* @returns {T | undefined} - The first item that has the specified property value, or `undefined` if no match is found.
|
|
98
98
|
*
|
|
@@ -107,7 +107,7 @@ declare function find<T extends Record<string, unknown>>(object: T | null | unde
|
|
|
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
|
*
|
|
109
109
|
* @template T
|
|
110
|
-
* @param {T
|
|
110
|
+
* @param {T | null | undefined} object - The object to search through.
|
|
111
111
|
* @param {string} propertyToCheck - The property name to check.
|
|
112
112
|
* @returns {T | undefined} - The first property value that has the specified property, or `undefined` if no match is found.
|
|
113
113
|
*
|
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.802+9c7b850e",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|