@oscarpalmer/atoms 0.184.1 → 0.185.0
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/index.d.mts +2 -2
- package/dist/array/index.mjs +2 -2
- package/dist/array/{position.d.mts → match.d.mts} +9 -6
- package/dist/array/{position.mjs → match.mjs} +16 -16
- package/dist/array/move.mjs +1 -1
- package/dist/array/single.mjs +2 -2
- package/dist/array/sort.d.mts +9 -4
- package/dist/array/sort.mjs +6 -6
- package/dist/array/swap.mjs +1 -1
- package/dist/beacon.d.mts +12 -0
- package/dist/beacon.mjs +9 -0
- package/dist/color/instance.d.mts +8 -0
- package/dist/color/instance.mjs +5 -2
- package/dist/color/misc/get.mjs +8 -8
- package/dist/color/misc/state.d.mts +2 -2
- package/dist/color/misc/state.mjs +2 -2
- package/dist/color/models.d.mts +30 -0
- package/dist/function/assert.d.mts +29 -8
- package/dist/function/assert.mjs +29 -8
- package/dist/function/memoize.d.mts +3 -0
- package/dist/function/memoize.mjs +3 -0
- package/dist/function/once.mjs +9 -9
- package/dist/function/retry.d.mts +3 -0
- package/dist/function/retry.mjs +11 -8
- package/dist/function/work.mjs +1 -1
- package/dist/index.d.mts +272 -160
- package/dist/index.mjs +279 -216
- package/dist/internal/number.d.mts +2 -1
- package/dist/internal/number.mjs +4 -1
- package/dist/internal/value/compare.d.mts +2 -1
- package/dist/internal/value/equal.d.mts +5 -0
- package/dist/internal/value/equal.mjs +5 -5
- package/dist/internal/value/get.d.mts +2 -2
- package/dist/internal/value/has.d.mts +3 -3
- package/dist/internal/value/has.mjs +1 -1
- package/dist/internal/value/misc.d.mts +2 -2
- package/dist/internal/value/misc.mjs +10 -4
- package/dist/logger.d.mts +11 -0
- package/dist/logger.mjs +11 -0
- package/dist/models.d.mts +1 -1
- package/dist/promise/helpers.mjs +3 -5
- package/dist/promise/index.d.mts +0 -6
- package/dist/promise/models.d.mts +36 -0
- package/dist/promise/models.mjs +6 -0
- package/dist/queue.d.mts +13 -1
- package/dist/queue.mjs +14 -7
- package/dist/result/index.d.mts +0 -8
- package/dist/result/index.mjs +0 -8
- package/dist/result/match.d.mts +4 -4
- package/dist/result/work/flow.d.mts +12 -36
- package/dist/result/work/pipe.d.mts +11 -33
- package/dist/sized/set.d.mts +3 -2
- package/dist/sized/set.mjs +3 -2
- package/dist/string/fuzzy.mjs +2 -2
- package/dist/value/handle.mjs +1 -1
- package/dist/value/merge.d.mts +0 -1
- package/dist/value/merge.mjs +0 -1
- package/dist/value/shake.d.mts +3 -0
- package/dist/value/smush.d.mts +3 -0
- package/dist/value/transform.d.mts +9 -0
- package/dist/value/unsmush.d.mts +3 -0
- package/package.json +3 -3
- package/src/array/difference.ts +4 -0
- package/src/array/from.ts +4 -0
- package/src/array/index.ts +1 -1
- package/src/array/intersection.ts +4 -0
- package/src/array/{position.ts → match.ts} +28 -25
- package/src/array/move.ts +5 -1
- package/src/array/reverse.ts +4 -0
- package/src/array/select.ts +2 -0
- package/src/array/single.ts +2 -2
- package/src/array/sort.ts +14 -9
- package/src/array/swap.ts +5 -1
- package/src/array/toggle.ts +4 -0
- package/src/array/union.ts +4 -0
- package/src/beacon.ts +12 -0
- package/src/color/index.ts +0 -3
- package/src/color/instance.ts +11 -3
- package/src/color/misc/get.ts +8 -8
- package/src/color/misc/state.ts +1 -1
- package/src/color/models.ts +30 -0
- package/src/function/assert.ts +66 -7
- package/src/function/memoize.ts +3 -0
- package/src/function/once.ts +13 -9
- package/src/function/retry.ts +11 -8
- package/src/internal/number.ts +6 -0
- package/src/internal/value/compare.ts +2 -1
- package/src/internal/value/equal.ts +10 -5
- package/src/internal/value/get.ts +2 -2
- package/src/internal/value/has.ts +6 -6
- package/src/internal/value/misc.ts +24 -13
- package/src/logger.ts +11 -0
- package/src/models.ts +1 -1
- package/src/promise/helpers.ts +3 -6
- package/src/promise/index.ts +0 -6
- package/src/promise/models.ts +36 -0
- package/src/queue.ts +23 -11
- package/src/result/index.ts +0 -8
- package/src/result/match.ts +4 -4
- package/src/result/work/flow.ts +12 -36
- package/src/result/work/pipe.ts +11 -33
- package/src/sized/set.ts +4 -3
- package/src/string/fuzzy.ts +2 -2
- package/src/value/merge.ts +0 -1
- package/src/value/shake.ts +3 -0
- package/src/value/smush.ts +3 -0
- package/src/value/transform.ts +9 -0
- package/src/value/unsmush.ts +3 -0
|
@@ -13,168 +13,144 @@ type AttemptFlowPromise<Callback extends GenericCallback, Value> = (...args: Par
|
|
|
13
13
|
/**
|
|
14
14
|
* Create an asynchronous Flow, a function that attempts to pipe a value through a series of functions
|
|
15
15
|
*
|
|
16
|
-
* Available as `attemptAsyncFlow` and `
|
|
16
|
+
* Available as `attemptAsyncFlow` and `attemptFlow.async`
|
|
17
17
|
* @returns Flow function
|
|
18
18
|
*/
|
|
19
19
|
declare function attemptAsyncFlow<Fn extends GenericCallback>(fn: Fn): AttemptFlowPromise<Fn, ReturnType<Fn>>;
|
|
20
20
|
/**
|
|
21
21
|
* Create an asynchronous Flow, a function that pipes values through a series of functions
|
|
22
22
|
*
|
|
23
|
-
* Available as `attemptAsyncFlow` and `
|
|
23
|
+
* Available as `attemptAsyncFlow` and `attemptFlow.async`
|
|
24
24
|
* @returns Flow function
|
|
25
25
|
*/
|
|
26
26
|
declare function attemptAsyncFlow<First extends GenericCallback, Second>(first: First, second: (value: Awaited<UnwrapValue<ReturnType<First>>>) => Second): AttemptFlowPromise<First, Second>;
|
|
27
27
|
/**
|
|
28
28
|
* Create an asynchronous Flow, a function that pipes values through a series of functions
|
|
29
29
|
*
|
|
30
|
-
* Available as `attemptAsyncFlow` and `
|
|
30
|
+
* Available as `attemptAsyncFlow` and `attemptFlow.async`
|
|
31
31
|
* @returns Flow function
|
|
32
32
|
*/
|
|
33
33
|
declare function attemptAsyncFlow<First extends GenericCallback, Second, Third>(first: First, second: (value: Awaited<UnwrapValue<ReturnType<First>>>) => Second, third: (value: Awaited<UnwrapValue<Second>>) => Third): AttemptFlowPromise<First, Third>;
|
|
34
34
|
/**
|
|
35
35
|
* Create an asynchronous Flow, a function that pipes values through a series of functions
|
|
36
36
|
*
|
|
37
|
-
* Available as `attemptAsyncFlow` and `
|
|
37
|
+
* Available as `attemptAsyncFlow` and `attemptFlow.async`
|
|
38
38
|
* @returns Flow function
|
|
39
39
|
*/
|
|
40
40
|
declare function attemptAsyncFlow<First extends GenericCallback, Second, Third, Fourth>(first: First, second: (value: Awaited<UnwrapValue<ReturnType<First>>>) => Second, third: (value: Awaited<UnwrapValue<Second>>) => Third, fourth: (value: Awaited<UnwrapValue<Third>>) => Fourth): AttemptFlowPromise<First, Fourth>;
|
|
41
41
|
/**
|
|
42
42
|
* Create an asynchronous Flow, a function that pipes values through a series of functions
|
|
43
43
|
*
|
|
44
|
-
* Available as `attemptAsyncFlow` and `
|
|
44
|
+
* Available as `attemptAsyncFlow` and `attemptFlow.async`
|
|
45
45
|
* @returns Flow function
|
|
46
46
|
*/
|
|
47
47
|
declare function attemptAsyncFlow<First extends GenericCallback, Second, Third, Fourth, Fifth>(first: First, second: (value: Awaited<UnwrapValue<ReturnType<First>>>) => Second, third: (value: Awaited<UnwrapValue<Second>>) => Third, fourth: (value: Awaited<UnwrapValue<Third>>) => Fourth, fifth: (value: Awaited<UnwrapValue<Fourth>>) => Fifth): AttemptFlowPromise<First, Fifth>;
|
|
48
48
|
/**
|
|
49
49
|
* Create an asynchronous Flow, a function that pipes values through a series of functions
|
|
50
50
|
*
|
|
51
|
-
* Available as `attemptAsyncFlow` and `
|
|
51
|
+
* Available as `attemptAsyncFlow` and `attemptFlow.async`
|
|
52
52
|
* @returns Flow function
|
|
53
53
|
*/
|
|
54
54
|
declare function attemptAsyncFlow<First extends GenericCallback, Second, Third, Fourth, Fifth, Sixth>(first: First, second: (value: Awaited<UnwrapValue<ReturnType<First>>>) => Second, third: (value: Awaited<UnwrapValue<Second>>) => Third, fourth: (value: Awaited<UnwrapValue<Third>>) => Fourth, fifth: (value: Awaited<UnwrapValue<Fourth>>) => Fifth, sixth: (value: Awaited<UnwrapValue<Fifth>>) => Sixth): AttemptFlowPromise<First, Sixth>;
|
|
55
55
|
/**
|
|
56
56
|
* Create an asynchronous Flow, a function that pipes values through a series of functions
|
|
57
57
|
*
|
|
58
|
-
* Available as `attemptAsyncFlow` and `
|
|
58
|
+
* Available as `attemptAsyncFlow` and `attemptFlow.async`
|
|
59
59
|
* @returns Flow function
|
|
60
60
|
*/
|
|
61
61
|
declare function attemptAsyncFlow<First extends GenericCallback, Second, Third, Fourth, Fifth, Sixth, Seventh>(first: First, second: (value: Awaited<UnwrapValue<ReturnType<First>>>) => Second, third: (value: Awaited<UnwrapValue<Second>>) => Third, fourth: (value: Awaited<UnwrapValue<Third>>) => Fourth, fifth: (value: Awaited<UnwrapValue<Fourth>>) => Fifth, sixth: (value: Awaited<UnwrapValue<Fifth>>) => Sixth, seventh: (value: Awaited<UnwrapValue<Sixth>>) => Seventh): AttemptFlowPromise<First, Seventh>;
|
|
62
62
|
/**
|
|
63
63
|
* Create an asynchronous Flow, a function that pipes values through a series of functions
|
|
64
64
|
*
|
|
65
|
-
* Available as `attemptAsyncFlow` and `
|
|
65
|
+
* Available as `attemptAsyncFlow` and `attemptFlow.async`
|
|
66
66
|
* @returns Flow function
|
|
67
67
|
*/
|
|
68
68
|
declare function attemptAsyncFlow<First extends GenericCallback, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(first: First, second: (value: Awaited<UnwrapValue<ReturnType<First>>>) => Second, third: (value: Awaited<UnwrapValue<Second>>) => Third, fourth: (value: Awaited<UnwrapValue<Third>>) => Fourth, fifth: (value: Awaited<UnwrapValue<Fourth>>) => Fifth, sixth: (value: Awaited<UnwrapValue<Fifth>>) => Sixth, seventh: (value: Awaited<UnwrapValue<Sixth>>) => Seventh, eighth: (value: Awaited<UnwrapValue<Seventh>>) => Eighth): AttemptFlowPromise<First, Eighth>;
|
|
69
69
|
/**
|
|
70
70
|
* Create an asynchronous Flow, a function that pipes values through a series of functions
|
|
71
71
|
*
|
|
72
|
-
* Available as `attemptAsyncFlow` and `
|
|
72
|
+
* Available as `attemptAsyncFlow` and `attemptFlow.async`
|
|
73
73
|
* @returns Flow function
|
|
74
74
|
*/
|
|
75
75
|
declare function attemptAsyncFlow<First extends GenericCallback, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth>(first: First, second: (value: Awaited<UnwrapValue<ReturnType<First>>>) => Second, third: (value: Awaited<UnwrapValue<Second>>) => Third, fourth: (value: Awaited<UnwrapValue<Third>>) => Fourth, fifth: (value: Awaited<UnwrapValue<Fourth>>) => Fifth, sixth: (value: Awaited<UnwrapValue<Fifth>>) => Sixth, seventh: (value: Awaited<UnwrapValue<Sixth>>) => Seventh, eighth: (value: Awaited<UnwrapValue<Seventh>>) => Eighth, ninth: (value: Awaited<UnwrapValue<Eighth>>) => Ninth): AttemptFlowPromise<First, Ninth>;
|
|
76
76
|
/**
|
|
77
77
|
* Create an asynchronous Flow, a function that pipes values through a series of functions
|
|
78
78
|
*
|
|
79
|
-
* Available as `attemptAsyncFlow` and `
|
|
79
|
+
* Available as `attemptAsyncFlow` and `attemptFlow.async`
|
|
80
80
|
* @returns Flow function
|
|
81
81
|
*/
|
|
82
82
|
declare function attemptAsyncFlow<First extends GenericCallback, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth>(first: First, second: (value: Awaited<UnwrapValue<ReturnType<First>>>) => Second, third: (value: Awaited<UnwrapValue<Second>>) => Third, fourth: (value: Awaited<UnwrapValue<Third>>) => Fourth, fifth: (value: Awaited<UnwrapValue<Fourth>>) => Fifth, sixth: (value: Awaited<UnwrapValue<Fifth>>) => Sixth, seventh: (value: Awaited<UnwrapValue<Sixth>>) => Seventh, eighth: (value: Awaited<UnwrapValue<Seventh>>) => Eighth, ninth: (value: Awaited<UnwrapValue<Eighth>>) => Ninth, tenth: (value: Awaited<UnwrapValue<Ninth>>) => Tenth): AttemptFlowPromise<First, Tenth>;
|
|
83
83
|
/**
|
|
84
84
|
* Create an asynchronous Flow, a function that pipes values through a series of functions
|
|
85
85
|
*
|
|
86
|
-
* Available as `attemptAsyncFlow` and `
|
|
86
|
+
* Available as `attemptAsyncFlow` and `attemptFlow.async`
|
|
87
87
|
* @returns Flow function
|
|
88
88
|
*/
|
|
89
89
|
declare function attemptAsyncFlow<Fn extends GenericCallback>(fn: Fn, ...fns: Array<(value: Awaited<UnwrapValue<ReturnType<Fn>>>) => unknown>): AttemptFlowPromise<Fn, ReturnType<Fn>>;
|
|
90
90
|
/**
|
|
91
91
|
* Create an asynchronous Flow, a function that pipes values through a series of functions
|
|
92
92
|
*
|
|
93
|
-
* Available as `attemptAsyncFlow` and `
|
|
93
|
+
* Available as `attemptAsyncFlow` and `attemptFlow.async`
|
|
94
94
|
* @returns Flow function
|
|
95
95
|
*/
|
|
96
96
|
declare function attemptAsyncFlow(...fns: GenericCallback[]): (...args: unknown[]) => Promise<Result<unknown>>;
|
|
97
97
|
/**
|
|
98
98
|
* Create a Flow, a function that attempts to pipe values through a function
|
|
99
|
-
*
|
|
100
|
-
* Available as `attemptFlow` and `attempt.flow`
|
|
101
99
|
* @returns Flow function
|
|
102
100
|
*/
|
|
103
101
|
declare function attemptFlow<Fn extends GenericCallback>(fn: Fn): AttemptFlow<Fn, ReturnType<Fn>>;
|
|
104
102
|
/**
|
|
105
103
|
* Create a Flow, a function that attempts to pipe values through a series of functions
|
|
106
|
-
*
|
|
107
|
-
* Available as `attemptFlow` and `attempt.flow`
|
|
108
104
|
* @returns Flow function
|
|
109
105
|
*/
|
|
110
106
|
declare function attemptFlow<First extends GenericCallback, Second>(first: First, second: (value: UnwrapValue<ReturnType<First>>) => Second): AttemptFlow<First, Second>;
|
|
111
107
|
/**
|
|
112
108
|
* Create a Flow, a function that attempts to pipe values through a series of functions
|
|
113
|
-
*
|
|
114
|
-
* Available as `attemptFlow` and `attempt.flow`
|
|
115
109
|
* @returns Flow function
|
|
116
110
|
*/
|
|
117
111
|
declare function attemptFlow<First extends GenericCallback, Second, Third>(first: First, second: (value: UnwrapValue<ReturnType<First>>) => Second, third: (value: UnwrapValue<Second>) => Third): AttemptFlow<First, Third>;
|
|
118
112
|
/**
|
|
119
113
|
* Create a Flow, a function that attempts to pipe values through a series of functions
|
|
120
|
-
*
|
|
121
|
-
* Available as `attemptFlow` and `attempt.flow`
|
|
122
114
|
* @returns Flow function
|
|
123
115
|
*/
|
|
124
116
|
declare function attemptFlow<First extends GenericCallback, Second, Third, Fourth>(first: First, second: (value: UnwrapValue<ReturnType<First>>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth): AttemptFlow<First, Fourth>;
|
|
125
117
|
/**
|
|
126
118
|
* Create a Flow, a function that attempts to pipe values through a series of functions
|
|
127
|
-
*
|
|
128
|
-
* Available as `attemptFlow` and `attempt.flow`
|
|
129
119
|
* @returns Flow function
|
|
130
120
|
*/
|
|
131
121
|
declare function attemptFlow<First extends GenericCallback, Second, Third, Fourth, Fifth>(first: First, second: (value: UnwrapValue<ReturnType<First>>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth, fifth: (value: UnwrapValue<Fourth>) => Fifth): AttemptFlow<First, Fifth>;
|
|
132
122
|
/**
|
|
133
123
|
* Create a Flow, a function that attempts to pipe values through a series of functions
|
|
134
|
-
*
|
|
135
|
-
* Available as `attemptFlow` and `attempt.flow`
|
|
136
124
|
* @returns Flow function
|
|
137
125
|
*/
|
|
138
126
|
declare function attemptFlow<First extends GenericCallback, Second, Third, Fourth, Fifth, Sixth>(first: First, second: (value: UnwrapValue<ReturnType<First>>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth, fifth: (value: UnwrapValue<Fourth>) => Fifth, sixth: (value: UnwrapValue<Fifth>) => Sixth): AttemptFlow<First, Sixth>;
|
|
139
127
|
/**
|
|
140
128
|
* Create a Flow, a function that attempts to pipe values through a series of functions
|
|
141
|
-
*
|
|
142
|
-
* Available as `attemptFlow` and `attempt.flow`
|
|
143
129
|
* @returns Flow function
|
|
144
130
|
*/
|
|
145
131
|
declare function attemptFlow<First extends GenericCallback, Second, Third, Fourth, Fifth, Sixth, Seventh>(first: First, second: (value: UnwrapValue<ReturnType<First>>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth, fifth: (value: UnwrapValue<Fourth>) => Fifth, sixth: (value: UnwrapValue<Fifth>) => Sixth, seventh: (value: UnwrapValue<Sixth>) => Seventh): AttemptFlow<First, Seventh>;
|
|
146
132
|
/**
|
|
147
133
|
* Create a Flow, a function that attempts to pipe values through a series of functions
|
|
148
|
-
*
|
|
149
|
-
* Available as `attemptFlow` and `attempt.flow`
|
|
150
134
|
* @returns Flow function
|
|
151
135
|
*/
|
|
152
136
|
declare function attemptFlow<First extends GenericCallback, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(first: First, second: (value: UnwrapValue<ReturnType<First>>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth, fifth: (value: UnwrapValue<Fourth>) => Fifth, sixth: (value: UnwrapValue<Fifth>) => Sixth, seventh: (value: UnwrapValue<Sixth>) => Seventh, eighth: (value: UnwrapValue<Seventh>) => Eighth): AttemptFlow<First, Eighth>;
|
|
153
137
|
/**
|
|
154
138
|
* Create a Flow, a function that attempts to pipe values through a series of functions
|
|
155
|
-
*
|
|
156
|
-
* Available as `attemptFlow` and `attempt.flow`
|
|
157
139
|
* @returns Flow function
|
|
158
140
|
*/
|
|
159
141
|
declare function attemptFlow<First extends GenericCallback, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth>(first: First, second: (value: UnwrapValue<ReturnType<First>>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth, fifth: (value: UnwrapValue<Fourth>) => Fifth, sixth: (value: UnwrapValue<Fifth>) => Sixth, seventh: (value: UnwrapValue<Sixth>) => Seventh, eighth: (value: UnwrapValue<Seventh>) => Eighth, ninth: (value: UnwrapValue<Eighth>) => Ninth): AttemptFlow<First, Ninth>;
|
|
160
142
|
/**
|
|
161
143
|
* Create a Flow, a function that attempts to pipe values through a series of functions
|
|
162
|
-
*
|
|
163
|
-
* Available as `attemptFlow` and `attempt.flow`
|
|
164
144
|
* @returns Flow function
|
|
165
145
|
*/
|
|
166
146
|
declare function attemptFlow<First extends GenericCallback, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth>(first: First, second: (value: UnwrapValue<ReturnType<First>>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth, fifth: (value: UnwrapValue<Fourth>) => Fifth, sixth: (value: UnwrapValue<Fifth>) => Sixth, seventh: (value: UnwrapValue<Sixth>) => Seventh, eighth: (value: UnwrapValue<Seventh>) => Eighth, ninth: (value: UnwrapValue<Eighth>) => Ninth, tenth: (value: UnwrapValue<Ninth>) => Tenth): AttemptFlow<First, Tenth>;
|
|
167
147
|
/**
|
|
168
148
|
* Create a Flow, a function that attempts to pipe values through a series of functions
|
|
169
|
-
*
|
|
170
|
-
* Available as `attemptFlow` and `attempt.flow`
|
|
171
149
|
* @returns Flow function
|
|
172
150
|
*/
|
|
173
151
|
declare function attemptFlow<First extends GenericCallback>(first: First, ...fns: Array<(value: UnwrapValue<ReturnType<First>>) => unknown>): AttemptFlow<First, ReturnType<First>>;
|
|
174
152
|
/**
|
|
175
153
|
* Create a Flow, a function that attempts to pipe values through a series of functions
|
|
176
|
-
*
|
|
177
|
-
* Available as `attemptFlow` and `attempt.flow`
|
|
178
154
|
* @returns Flow function
|
|
179
155
|
*/
|
|
180
156
|
declare function attemptFlow(...fns: GenericCallback[]): (...args: unknown[]) => Result<unknown>;
|
|
@@ -6,7 +6,7 @@ type WrapValue<Value> = Result<UnwrapValue<Value>>;
|
|
|
6
6
|
/**
|
|
7
7
|
* Attempt to pipe a value through a function
|
|
8
8
|
*
|
|
9
|
-
* Available as `attemptAsyncPipe` and `
|
|
9
|
+
* Available as `attemptAsyncPipe` and `attemptPipe.async`
|
|
10
10
|
* @param initial Initial value
|
|
11
11
|
* @returns Piped result
|
|
12
12
|
*/
|
|
@@ -14,7 +14,7 @@ declare function attemptAsyncPipe<Initial, Piped>(initial: GenericCallback | Ini
|
|
|
14
14
|
/**
|
|
15
15
|
* Attempt to pipe a value through a series of functions
|
|
16
16
|
*
|
|
17
|
-
* Available as `attemptAsyncPipe` and `
|
|
17
|
+
* Available as `attemptAsyncPipe` and `attemptPipe.async`
|
|
18
18
|
* @param initial Initial value
|
|
19
19
|
* @returns Piped result
|
|
20
20
|
*/
|
|
@@ -22,7 +22,7 @@ declare function attemptAsyncPipe<Initial, First, Second>(initial: GenericCallba
|
|
|
22
22
|
/**
|
|
23
23
|
* Attempt to pipe a value through a series of functions
|
|
24
24
|
*
|
|
25
|
-
* Available as `attemptAsyncPipe` and `
|
|
25
|
+
* Available as `attemptAsyncPipe` and `attemptPipe.async`
|
|
26
26
|
* @param initial Initial value
|
|
27
27
|
* @returns Piped result
|
|
28
28
|
*/
|
|
@@ -30,7 +30,7 @@ declare function attemptAsyncPipe<Initial, First, Second, Third>(initial: Generi
|
|
|
30
30
|
/**
|
|
31
31
|
* Attempt to pipe a value through a series of functions
|
|
32
32
|
*
|
|
33
|
-
* Available as `attemptAsyncPipe` and `
|
|
33
|
+
* Available as `attemptAsyncPipe` and `attemptPipe.async`
|
|
34
34
|
* @param initial Initial value
|
|
35
35
|
* @returns Piped result
|
|
36
36
|
*/
|
|
@@ -38,7 +38,7 @@ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth>(initial
|
|
|
38
38
|
/**
|
|
39
39
|
* Attempt to pipe a value through a series of functions
|
|
40
40
|
*
|
|
41
|
-
* Available as `attemptAsyncPipe` and `
|
|
41
|
+
* Available as `attemptAsyncPipe` and `attemptPipe.async`
|
|
42
42
|
* @param initial Initial value
|
|
43
43
|
* @returns Piped result
|
|
44
44
|
*/
|
|
@@ -46,7 +46,7 @@ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth>(
|
|
|
46
46
|
/**
|
|
47
47
|
* Attempt to pipe a value through a series of functions
|
|
48
48
|
*
|
|
49
|
-
* Available as `attemptAsyncPipe` and `
|
|
49
|
+
* Available as `attemptAsyncPipe` and `attemptPipe.async`
|
|
50
50
|
* @param initial Initial value
|
|
51
51
|
* @returns Piped result
|
|
52
52
|
*/
|
|
@@ -54,7 +54,7 @@ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth,
|
|
|
54
54
|
/**
|
|
55
55
|
* Attempt to pipe a value through a series of functions
|
|
56
56
|
*
|
|
57
|
-
* Available as `attemptAsyncPipe` and `
|
|
57
|
+
* Available as `attemptAsyncPipe` and `attemptPipe.async`
|
|
58
58
|
* @param initial Initial value
|
|
59
59
|
* @returns Piped result
|
|
60
60
|
*/
|
|
@@ -62,7 +62,7 @@ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth,
|
|
|
62
62
|
/**
|
|
63
63
|
* Attempt to pipe a value through a series of functions
|
|
64
64
|
*
|
|
65
|
-
* Available as `attemptAsyncPipe` and `
|
|
65
|
+
* Available as `attemptAsyncPipe` and `attemptPipe.async`
|
|
66
66
|
* @param initial Initial value
|
|
67
67
|
* @returns Piped result
|
|
68
68
|
*/
|
|
@@ -70,7 +70,7 @@ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth,
|
|
|
70
70
|
/**
|
|
71
71
|
* Attempt to pipe a value through a series of functions
|
|
72
72
|
*
|
|
73
|
-
* Available as `attemptAsyncPipe` and `
|
|
73
|
+
* Available as `attemptAsyncPipe` and `attemptPipe.async`
|
|
74
74
|
* @param initial Initial value
|
|
75
75
|
* @returns Piped result
|
|
76
76
|
*/
|
|
@@ -78,7 +78,7 @@ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth,
|
|
|
78
78
|
/**
|
|
79
79
|
* Attempt to pipe a value through a series of functions
|
|
80
80
|
*
|
|
81
|
-
* Available as `attemptAsyncPipe` and `
|
|
81
|
+
* Available as `attemptAsyncPipe` and `attemptPipe.async`
|
|
82
82
|
* @param initial Initial value
|
|
83
83
|
* @returns Piped result
|
|
84
84
|
*/
|
|
@@ -86,95 +86,73 @@ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth,
|
|
|
86
86
|
/**
|
|
87
87
|
* Attempt to pipe a result through a series of functions
|
|
88
88
|
*
|
|
89
|
-
* Available as `attemptAsyncPipe` and `
|
|
89
|
+
* Available as `attemptAsyncPipe` and `attemptPipe.async`
|
|
90
90
|
* @param initial Initial result
|
|
91
91
|
* @returns Piped result
|
|
92
92
|
*/
|
|
93
93
|
declare function attemptAsyncPipe<Initial>(initial: GenericCallback | Initial | Promise<Initial> | Result<Initial>, first?: (value: UnwrapValue<Initial>) => unknown, ...seconds: Array<(value: unknown) => unknown>): Promise<WrapValue<Initial>>;
|
|
94
94
|
/**
|
|
95
95
|
* Attempt to pipe a value through a function
|
|
96
|
-
*
|
|
97
|
-
* Available as `attemptPipe` and `attempt.pipe`
|
|
98
96
|
* @param initial Initial value
|
|
99
97
|
* @returns Piped result
|
|
100
98
|
*/
|
|
101
99
|
declare function attemptPipe<Initial, Pipe>(initial: GenericCallback | Initial | Result<Initial>, pipe: (value: UnwrapValue<Initial>) => Pipe): WrapValue<Pipe>;
|
|
102
100
|
/**
|
|
103
101
|
* Attempt to pipe a value through a series of functions
|
|
104
|
-
*
|
|
105
|
-
* Available as `attemptPipe` and `attempt.pipe`
|
|
106
102
|
* @param initial Initial value
|
|
107
103
|
* @returns Piped result
|
|
108
104
|
*/
|
|
109
105
|
declare function attemptPipe<Initial, First, Second>(initial: GenericCallback | Initial | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second): WrapValue<Second>;
|
|
110
106
|
/**
|
|
111
107
|
* Attempt to pipe a value through a series of functions
|
|
112
|
-
*
|
|
113
|
-
* Available as `attemptPipe` and `attempt.pipe`
|
|
114
108
|
* @param initial Initial value
|
|
115
109
|
* @returns Piped result
|
|
116
110
|
*/
|
|
117
111
|
declare function attemptPipe<Initial, First, Second, Third>(initial: GenericCallback | Initial | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third): WrapValue<Third>;
|
|
118
112
|
/**
|
|
119
113
|
* Attempt to pipe a value through a series of functions
|
|
120
|
-
*
|
|
121
|
-
* Available as `attemptPipe` and `attempt.pipe`
|
|
122
114
|
* @param initial Initial value
|
|
123
115
|
* @returns Piped result
|
|
124
116
|
*/
|
|
125
117
|
declare function attemptPipe<Initial, First, Second, Third, Fourth>(initial: GenericCallback | Initial | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth): WrapValue<Fourth>;
|
|
126
118
|
/**
|
|
127
119
|
* Attempt to pipe a value through a series of functions
|
|
128
|
-
*
|
|
129
|
-
* Available as `attemptPipe` and `attempt.pipe`
|
|
130
120
|
* @param initial Initial value
|
|
131
121
|
* @returns Piped result
|
|
132
122
|
*/
|
|
133
123
|
declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth>(initial: GenericCallback | Initial | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth, fifth: (value: UnwrapValue<Fourth>) => Fifth): WrapValue<Fifth>;
|
|
134
124
|
/**
|
|
135
125
|
* Attempt to pipe a value through a series of functions
|
|
136
|
-
*
|
|
137
|
-
* Available as `attemptPipe` and `attempt.pipe`
|
|
138
126
|
* @param initial Initial value
|
|
139
127
|
* @returns Piped result
|
|
140
128
|
*/
|
|
141
129
|
declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth>(initial: GenericCallback | Initial | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth, fifth: (value: UnwrapValue<Fourth>) => Fifth, sixth: (value: UnwrapValue<Fifth>) => Sixth): WrapValue<Sixth>;
|
|
142
130
|
/**
|
|
143
131
|
* Attempt to pipe a value through a series of functions
|
|
144
|
-
*
|
|
145
|
-
* Available as `attemptPipe` and `attempt.pipe`
|
|
146
132
|
* @param initial Initial value
|
|
147
133
|
* @returns Piped result
|
|
148
134
|
*/
|
|
149
135
|
declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh>(initial: GenericCallback | Initial | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth, fifth: (value: UnwrapValue<Fourth>) => Fifth, sixth: (value: UnwrapValue<Fifth>) => Sixth, seventh: (value: UnwrapValue<Sixth>) => Seventh): WrapValue<Seventh>;
|
|
150
136
|
/**
|
|
151
137
|
* Attempt to pipe a value through a series of functions
|
|
152
|
-
*
|
|
153
|
-
* Available as `attemptPipe` and `attempt.pipe`
|
|
154
138
|
* @param initial Initial value
|
|
155
139
|
* @returns Piped result
|
|
156
140
|
*/
|
|
157
141
|
declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(initial: GenericCallback | Initial | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth, fifth: (value: UnwrapValue<Fourth>) => Fifth, sixth: (value: UnwrapValue<Fifth>) => Sixth, seventh: (value: UnwrapValue<Sixth>) => Seventh, eighth: (value: UnwrapValue<Seventh>) => Eighth): WrapValue<Eighth>;
|
|
158
142
|
/**
|
|
159
143
|
* Attempt to pipe a value through a series of functions
|
|
160
|
-
*
|
|
161
|
-
* Available as `attemptPipe` and `attempt.pipe`
|
|
162
144
|
* @param initial Initial value
|
|
163
145
|
* @returns Piped result
|
|
164
146
|
*/
|
|
165
147
|
declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth>(initial: GenericCallback | Initial | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth, fifth: (value: UnwrapValue<Fourth>) => Fifth, sixth: (value: UnwrapValue<Fifth>) => Sixth, seventh: (value: UnwrapValue<Sixth>) => Seventh, eighth: (value: UnwrapValue<Seventh>) => Eighth, ninth: (value: UnwrapValue<Eighth>) => Ninth): WrapValue<Ninth>;
|
|
166
148
|
/**
|
|
167
149
|
* Attempt to pipe a value through a series of functions
|
|
168
|
-
*
|
|
169
|
-
* Available as `attemptPipe` and `attempt.pipe`
|
|
170
150
|
* @param initial Initial value
|
|
171
151
|
* @returns Piped result
|
|
172
152
|
*/
|
|
173
153
|
declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth>(initial: GenericCallback | Initial | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth, fifth: (value: UnwrapValue<Fourth>) => Fifth, sixth: (value: UnwrapValue<Fifth>) => Sixth, seventh: (value: UnwrapValue<Sixth>) => Seventh, eighth: (value: UnwrapValue<Seventh>) => Eighth, ninth: (value: UnwrapValue<Eighth>) => Ninth, tenth: (value: UnwrapValue<Ninth>) => Tenth): WrapValue<Tenth>;
|
|
174
154
|
/**
|
|
175
155
|
* Attempt to pipe a result through a series of functions
|
|
176
|
-
*
|
|
177
|
-
* Available as `attemptPipe` and `attempt.pipe`
|
|
178
156
|
* @param initial Initial result
|
|
179
157
|
* @returns Piped result
|
|
180
158
|
*/
|
package/dist/sized/set.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
//#region src/sized/set.d.ts
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* A Set with a maximum size
|
|
4
|
+
*
|
|
5
|
+
* Behavior is similar to a _LRU_-cache, where the oldest values are removed
|
|
5
6
|
*/
|
|
6
7
|
declare class SizedSet<Value = unknown> extends Set<Value> {
|
|
7
8
|
#private;
|
package/dist/sized/set.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { getSizedMaximum } from "../internal/sized.mjs";
|
|
2
2
|
//#region src/sized/set.ts
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* A Set with a maximum size
|
|
5
|
+
*
|
|
6
|
+
* Behavior is similar to a _LRU_-cache, where the oldest values are removed
|
|
6
7
|
*/
|
|
7
8
|
var SizedSet = class extends Set {
|
|
8
9
|
/**
|
package/dist/string/fuzzy.mjs
CHANGED
|
@@ -57,7 +57,7 @@ function getFuzzyOptions(input, state) {
|
|
|
57
57
|
options.tolerance = getTolerance(options.tolerance, state);
|
|
58
58
|
return options;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function getFuzzyState(items, input) {
|
|
61
61
|
const handler = getHandler(input);
|
|
62
62
|
const options = getFuzzyOptions(input);
|
|
63
63
|
return {
|
|
@@ -74,7 +74,7 @@ function getTolerance(input, state) {
|
|
|
74
74
|
}
|
|
75
75
|
function fuzzy(items, configuration) {
|
|
76
76
|
if (!Array.isArray(items)) throw new TypeError(MESSAGE_ARRAY);
|
|
77
|
-
return new Fuzzy(
|
|
77
|
+
return new Fuzzy(getFuzzyState(items, configuration));
|
|
78
78
|
}
|
|
79
79
|
fuzzy.match = fuzzyMatch;
|
|
80
80
|
/**
|
package/dist/value/handle.mjs
CHANGED
package/dist/value/merge.d.mts
CHANGED
|
@@ -93,7 +93,6 @@ declare function merge<Model extends ArrayOrPlainObject>(values: NestedPartial<M
|
|
|
93
93
|
*/
|
|
94
94
|
declare function merge(values: NestedPartial<ArrayOrPlainObject>[], options?: MergeOptions): ArrayOrPlainObject;
|
|
95
95
|
declare namespace merge {
|
|
96
|
-
var assign: typeof assign;
|
|
97
96
|
var initialize: typeof initializeMerger;
|
|
98
97
|
}
|
|
99
98
|
//#endregion
|
package/dist/value/merge.mjs
CHANGED
|
@@ -61,7 +61,6 @@ function initializeMerger(options) {
|
|
|
61
61
|
function merge(values, options) {
|
|
62
62
|
return handleMerge(values, getMergeOptions(options));
|
|
63
63
|
}
|
|
64
|
-
merge.assign = assign;
|
|
65
64
|
merge.initialize = initializeMerger;
|
|
66
65
|
function mergeObjects(values, options, prefix) {
|
|
67
66
|
const { length } = values;
|
package/dist/value/shake.d.mts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { PlainObject } from "../models.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/value/shake.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A shaken object, without any `undefined` values
|
|
6
|
+
*/
|
|
4
7
|
type Shaken<Value extends PlainObject> = { [Key in keyof Value]: Value[Key] extends undefined ? never : Value[Key] };
|
|
5
8
|
/**
|
|
6
9
|
* Shake an object, removing all keys with `undefined` values
|
package/dist/value/smush.d.mts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { NestedKeys, NestedValue, PlainObject, Simplify, ToString } from "../models.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/value/smush.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A smushed object, with all nested objects flattened into a single level, using dot notation keys
|
|
6
|
+
*/
|
|
4
7
|
type Smushed<Value extends PlainObject> = Simplify<{ [NestedKey in NestedKeys<Value>]: NestedValue<Value, ToString<NestedKey>> }>;
|
|
5
8
|
/**
|
|
6
9
|
* Smush an object into a flat object that uses dot notation keys
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { PlainObject } from "../models.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/value/transform.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A callback transform an object's properties
|
|
6
|
+
*/
|
|
4
7
|
type TransformCallback<Value extends PlainObject, Key extends keyof Value> = (key: Key, value: Value[Key]) => Value[Key];
|
|
8
|
+
/**
|
|
9
|
+
* A collection of keyed callbacks to transform an object's properties
|
|
10
|
+
*/
|
|
5
11
|
type TransformCallbacks<Value extends PlainObject> = Partial<{ [Key in keyof Value]: (value: Value[Key]) => Value[Key] }>;
|
|
12
|
+
/**
|
|
13
|
+
* A transformer function for an object, with predefined callbacks for transforming its properties
|
|
14
|
+
*/
|
|
6
15
|
type Transformer<Value extends PlainObject> = {
|
|
7
16
|
(value: Value): Value;
|
|
8
17
|
};
|
package/dist/value/unsmush.d.mts
CHANGED
|
@@ -9,6 +9,9 @@ type KeysOfUnion<ObjectType> = keyof UnionToIntersection<ObjectType extends unkn
|
|
|
9
9
|
* Thanks, type-fest!
|
|
10
10
|
*/
|
|
11
11
|
type UnionToIntersection<Union> = (Union extends unknown ? (distributedUnion: Union) => void : never) extends ((mergedIntersection: infer Intersection) => void) ? Intersection & Union : never;
|
|
12
|
+
/**
|
|
13
|
+
* An unsmushed object, with all dot notation keys turned into nested keys
|
|
14
|
+
*/
|
|
12
15
|
type Unsmushed<Value extends PlainObject> = Simplify<Omit<{ [UnionKey in KeysOfUnion<Value>]: Value[UnionKey] }, `${string}.${string}`>>;
|
|
13
16
|
/**
|
|
14
17
|
* Unsmush a smushed object _(turning dot notation keys into nested keys)_
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscarpalmer/atoms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.185.0",
|
|
4
4
|
"description": "Atomic utilities for making your JavaScript better.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"helper",
|
|
@@ -253,11 +253,11 @@
|
|
|
253
253
|
"watch": "npx vite build --watch"
|
|
254
254
|
},
|
|
255
255
|
"devDependencies": {
|
|
256
|
-
"@oxlint/plugins": "^1.
|
|
256
|
+
"@oxlint/plugins": "^1.62",
|
|
257
257
|
"@types/node": "^25.6",
|
|
258
258
|
"@vitest/coverage-istanbul": "^4.1",
|
|
259
259
|
"eslint": "^10.2",
|
|
260
|
-
"jsdom": "^29.
|
|
260
|
+
"jsdom": "^29.1",
|
|
261
261
|
"tsdown": "^0.21",
|
|
262
262
|
"typescript": "^5.9",
|
|
263
263
|
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
package/src/array/difference.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {COMPARE_SETS_DIFFERENCE, compareSets} from '../internal/array/sets';
|
|
2
2
|
import type {PlainObject} from '../models';
|
|
3
3
|
|
|
4
|
+
// #region Functions
|
|
5
|
+
|
|
4
6
|
/**
|
|
5
7
|
* Get the items from the first array that are not in the second array
|
|
6
8
|
* @param first First array
|
|
@@ -38,3 +40,5 @@ export function difference<First, Second>(first: First[], second: Second[]): Fir
|
|
|
38
40
|
export function difference(first: unknown[], second: unknown[], key?: unknown): unknown[] {
|
|
39
41
|
return compareSets(COMPARE_SETS_DIFFERENCE, first, second, key);
|
|
40
42
|
}
|
|
43
|
+
|
|
44
|
+
// #endregion
|
package/src/array/from.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// #region Functions
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Get an array with a specified length, filled with indices
|
|
3
5
|
* @param length Length of the array
|
|
@@ -87,3 +89,5 @@ export function times(length: number, value?: unknown): unknown[] {
|
|
|
87
89
|
|
|
88
90
|
return values;
|
|
89
91
|
}
|
|
92
|
+
|
|
93
|
+
// #endregion
|
package/src/array/index.ts
CHANGED
|
@@ -12,7 +12,7 @@ export * from './get';
|
|
|
12
12
|
export * from './insert';
|
|
13
13
|
export * from './intersection';
|
|
14
14
|
export * from './partition';
|
|
15
|
-
export * from './
|
|
15
|
+
export * from './match';
|
|
16
16
|
export * from './push';
|
|
17
17
|
export * from './reverse';
|
|
18
18
|
export * from './select';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import {COMPARE_SETS_INTERSECTION, compareSets} from '../internal/array/sets';
|
|
2
2
|
|
|
3
|
+
// #region Functions
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* Get the common values between two arrays
|
|
5
7
|
* @param first First array
|
|
@@ -37,3 +39,5 @@ export function intersection<First, Second>(first: First[], second: Second[]): F
|
|
|
37
39
|
export function intersection(first: unknown[], second: unknown[], key?: unknown): unknown[] {
|
|
38
40
|
return compareSets(COMPARE_SETS_INTERSECTION, first, second, key);
|
|
39
41
|
}
|
|
42
|
+
|
|
43
|
+
// #endregion
|