es-toolkit 1.49.0-dev.1911 → 1.49.0-dev.1912
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.
|
@@ -20,6 +20,7 @@ declare function filter(collection: string | null | undefined, predicate?: Strin
|
|
|
20
20
|
/**
|
|
21
21
|
* Filters elements in an array-like object using a type guard predicate.
|
|
22
22
|
*
|
|
23
|
+
* @template T, U
|
|
23
24
|
* @param collection - The array-like object to filter
|
|
24
25
|
* @param predicate - The type guard function to test each element
|
|
25
26
|
* @returns An array of elements that are of type U
|
|
@@ -32,6 +33,7 @@ declare function filter<T, U extends T>(collection: ArrayLike<T> | null | undefi
|
|
|
32
33
|
/**
|
|
33
34
|
* Filters elements in an array-like object based on the predicate.
|
|
34
35
|
*
|
|
36
|
+
* @template T
|
|
35
37
|
* @param collection - The array-like object to filter
|
|
36
38
|
* @param predicate - The function or shorthand to test each element
|
|
37
39
|
* @returns An array of elements that pass the predicate test
|
|
@@ -47,6 +49,7 @@ declare function filter<T>(collection: ArrayLike<T> | null | undefined, predicat
|
|
|
47
49
|
/**
|
|
48
50
|
* Filters values in an object using a type guard predicate.
|
|
49
51
|
*
|
|
52
|
+
* @template T, U
|
|
50
53
|
* @param collection - The object to filter
|
|
51
54
|
* @param predicate - The type guard function to test each value
|
|
52
55
|
* @returns An array of values that are of type U
|
|
@@ -59,6 +62,7 @@ declare function filter<T extends object, U extends T[keyof T]>(collection: T |
|
|
|
59
62
|
/**
|
|
60
63
|
* Filters values in an object based on the predicate.
|
|
61
64
|
*
|
|
65
|
+
* @template T
|
|
62
66
|
* @param collection - The object to filter
|
|
63
67
|
* @param predicate - The function or shorthand to test each value
|
|
64
68
|
* @returns An array of values that pass the predicate test
|
|
@@ -20,6 +20,7 @@ declare function filter(collection: string | null | undefined, predicate?: Strin
|
|
|
20
20
|
/**
|
|
21
21
|
* Filters elements in an array-like object using a type guard predicate.
|
|
22
22
|
*
|
|
23
|
+
* @template T, U
|
|
23
24
|
* @param collection - The array-like object to filter
|
|
24
25
|
* @param predicate - The type guard function to test each element
|
|
25
26
|
* @returns An array of elements that are of type U
|
|
@@ -32,6 +33,7 @@ declare function filter<T, U extends T>(collection: ArrayLike<T> | null | undefi
|
|
|
32
33
|
/**
|
|
33
34
|
* Filters elements in an array-like object based on the predicate.
|
|
34
35
|
*
|
|
36
|
+
* @template T
|
|
35
37
|
* @param collection - The array-like object to filter
|
|
36
38
|
* @param predicate - The function or shorthand to test each element
|
|
37
39
|
* @returns An array of elements that pass the predicate test
|
|
@@ -47,6 +49,7 @@ declare function filter<T>(collection: ArrayLike<T> | null | undefined, predicat
|
|
|
47
49
|
/**
|
|
48
50
|
* Filters values in an object using a type guard predicate.
|
|
49
51
|
*
|
|
52
|
+
* @template T, U
|
|
50
53
|
* @param collection - The object to filter
|
|
51
54
|
* @param predicate - The type guard function to test each value
|
|
52
55
|
* @returns An array of values that are of type U
|
|
@@ -59,6 +62,7 @@ declare function filter<T extends object, U extends T[keyof T]>(collection: T |
|
|
|
59
62
|
/**
|
|
60
63
|
* Filters values in an object based on the predicate.
|
|
61
64
|
*
|
|
65
|
+
* @template T
|
|
62
66
|
* @param collection - The object to filter
|
|
63
67
|
* @param predicate - The function or shorthand to test each value
|
|
64
68
|
* @returns An array of values that pass the predicate test
|
|
@@ -7,6 +7,7 @@ import { ListIteratorTypeGuard } from "../_internal/ListIteratorTypeGuard.mjs";
|
|
|
7
7
|
/**
|
|
8
8
|
* Finds the first element in an array-like object that matches a type guard predicate.
|
|
9
9
|
*
|
|
10
|
+
* @template T, U
|
|
10
11
|
* @param collection - The array-like object to search
|
|
11
12
|
* @param predicate - The type guard function to test each element
|
|
12
13
|
* @param fromIndex - The index to start searching from
|
|
@@ -20,6 +21,7 @@ declare function find<T, U extends T>(collection: ArrayLike<T> | null | undefine
|
|
|
20
21
|
/**
|
|
21
22
|
* Finds the first element in an array-like object that matches a predicate.
|
|
22
23
|
*
|
|
24
|
+
* @template T
|
|
23
25
|
* @param collection - The array-like object to search
|
|
24
26
|
* @param predicate - The function or shorthand to test each element
|
|
25
27
|
* @param fromIndex - The index to start searching from
|
|
@@ -36,6 +38,7 @@ declare function find<T>(collection: ArrayLike<T> | null | undefined, predicate?
|
|
|
36
38
|
/**
|
|
37
39
|
* Finds the first value in an object that matches a type guard predicate.
|
|
38
40
|
*
|
|
41
|
+
* @template T, U
|
|
39
42
|
* @param collection - The object to search
|
|
40
43
|
* @param predicate - The type guard function to test each value
|
|
41
44
|
* @param fromIndex - The index to start searching from
|
|
@@ -49,6 +52,7 @@ declare function find<T extends object, U extends T[keyof T]>(collection: T | nu
|
|
|
49
52
|
/**
|
|
50
53
|
* Finds the first value in an object that matches a predicate.
|
|
51
54
|
*
|
|
55
|
+
* @template T
|
|
52
56
|
* @param collection - The object to search
|
|
53
57
|
* @param predicate - The function or shorthand to test each value
|
|
54
58
|
* @param fromIndex - The index to start searching from
|
|
@@ -7,6 +7,7 @@ import { ListIteratorTypeGuard } from "../_internal/ListIteratorTypeGuard.js";
|
|
|
7
7
|
/**
|
|
8
8
|
* Finds the first element in an array-like object that matches a type guard predicate.
|
|
9
9
|
*
|
|
10
|
+
* @template T, U
|
|
10
11
|
* @param collection - The array-like object to search
|
|
11
12
|
* @param predicate - The type guard function to test each element
|
|
12
13
|
* @param fromIndex - The index to start searching from
|
|
@@ -20,6 +21,7 @@ declare function find<T, U extends T>(collection: ArrayLike<T> | null | undefine
|
|
|
20
21
|
/**
|
|
21
22
|
* Finds the first element in an array-like object that matches a predicate.
|
|
22
23
|
*
|
|
24
|
+
* @template T
|
|
23
25
|
* @param collection - The array-like object to search
|
|
24
26
|
* @param predicate - The function or shorthand to test each element
|
|
25
27
|
* @param fromIndex - The index to start searching from
|
|
@@ -36,6 +38,7 @@ declare function find<T>(collection: ArrayLike<T> | null | undefined, predicate?
|
|
|
36
38
|
/**
|
|
37
39
|
* Finds the first value in an object that matches a type guard predicate.
|
|
38
40
|
*
|
|
41
|
+
* @template T, U
|
|
39
42
|
* @param collection - The object to search
|
|
40
43
|
* @param predicate - The type guard function to test each value
|
|
41
44
|
* @param fromIndex - The index to start searching from
|
|
@@ -49,6 +52,7 @@ declare function find<T extends object, U extends T[keyof T]>(collection: T | nu
|
|
|
49
52
|
/**
|
|
50
53
|
* Finds the first value in an object that matches a predicate.
|
|
51
54
|
*
|
|
55
|
+
* @template T
|
|
52
56
|
* @param collection - The object to search
|
|
53
57
|
* @param predicate - The function or shorthand to test each value
|
|
54
58
|
* @param fromIndex - The index to start searching from
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
|
-
"version": "1.49.0-dev.
|
|
3
|
+
"version": "1.49.0-dev.1912+3552afed",
|
|
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",
|