@oscarpalmer/atoms 0.186.2 → 0.187.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/filter.d.mts +4 -4
- package/dist/array/find.d.mts +4 -4
- package/dist/array/first.d.mts +4 -4
- package/dist/array/get.d.mts +27 -1
- package/dist/array/get.mjs +5 -3
- package/dist/array/group-by.d.mts +6 -6
- package/dist/array/last.d.mts +4 -4
- package/dist/array/match.d.mts +7 -6
- package/dist/array/move.d.mts +7 -7
- package/dist/array/move.mjs +1 -1
- package/dist/array/select.d.mts +1 -0
- package/dist/array/slice.d.mts +3 -3
- package/dist/array/sort.d.mts +10 -7
- package/dist/array/sort.mjs +4 -3
- package/dist/array/swap.d.mts +1 -1
- package/dist/array/swap.mjs +1 -1
- package/dist/array/to-map.d.mts +32 -32
- package/dist/array/to-record.d.mts +6 -6
- package/dist/array/to-set.d.mts +6 -6
- package/dist/beacon.d.mts +6 -0
- package/dist/beacon.mjs +3 -0
- package/dist/color/index.d.mts +6 -2
- package/dist/color/index.mjs +6 -2
- package/dist/color/instance.d.mts +78 -14
- package/dist/color/instance.mjs +78 -14
- package/dist/color/misc/get.d.mts +39 -11
- package/dist/color/misc/get.mjs +39 -11
- package/dist/color/misc/is.d.mts +26 -11
- package/dist/color/misc/is.mjs +26 -11
- package/dist/color/misc/state.mjs +1 -1
- package/dist/color/models.d.mts +7 -4
- package/dist/color/space/hex.d.mts +15 -6
- package/dist/color/space/hex.mjs +15 -6
- package/dist/color/space/hsl.d.mts +10 -4
- package/dist/color/space/hsl.mjs +10 -4
- package/dist/color/space/rgb.d.mts +21 -12
- package/dist/color/space/rgb.mjs +21 -12
- package/dist/function/assert.d.mts +20 -14
- package/dist/function/assert.mjs +19 -13
- package/dist/function/limit.d.mts +8 -6
- package/dist/function/limit.mjs +8 -6
- package/dist/function/memoize.d.mts +15 -4
- package/dist/function/memoize.mjs +18 -4
- package/dist/function/once.d.mts +5 -3
- package/dist/function/once.mjs +5 -3
- package/dist/function/retry.d.mts +5 -2
- package/dist/function/retry.mjs +3 -1
- package/dist/function/work.d.mts +146 -98
- package/dist/{kalas.d.mts → herald.d.mts} +17 -8
- package/dist/{kalas.mjs → herald.mjs} +22 -13
- package/dist/index.d.mts +1464 -708
- package/dist/index.mjs +677 -324
- package/dist/internal/array/index-of.d.mts +4 -4
- package/dist/internal/array/insert.mjs +1 -1
- package/dist/internal/array/shuffle.d.mts +1 -0
- package/dist/internal/array/shuffle.mjs +2 -1
- package/dist/internal/is.d.mts +26 -8
- package/dist/internal/is.mjs +26 -8
- package/dist/internal/math/aggregate.d.mts +9 -9
- package/dist/internal/number.d.mts +13 -2
- package/dist/internal/number.mjs +13 -2
- package/dist/internal/random.d.mts +4 -2
- package/dist/internal/random.mjs +7 -5
- package/dist/internal/result.d.mts +17 -11
- package/dist/internal/result.mjs +10 -14
- package/dist/internal/string.d.mts +16 -1
- package/dist/internal/string.mjs +24 -1
- package/dist/internal/value/compare.d.mts +5 -2
- package/dist/internal/value/compare.mjs +5 -2
- package/dist/internal/value/equal.d.mts +12 -3
- package/dist/internal/value/equal.mjs +7 -4
- package/dist/internal/value/get.d.mts +17 -17
- package/dist/internal/value/has.d.mts +55 -11
- package/dist/internal/value/set.d.mts +24 -0
- package/dist/is.d.mts +12 -0
- package/dist/is.mjs +16 -1
- package/dist/logger.d.mts +7 -6
- package/dist/logger.mjs +6 -5
- package/dist/math.d.mts +36 -18
- package/dist/math.mjs +6 -3
- package/dist/models.d.mts +3 -3
- package/dist/promise/delay.d.mts +2 -0
- package/dist/promise/helpers.d.mts +6 -4
- package/dist/promise/helpers.mjs +6 -4
- package/dist/promise/index.d.mts +49 -38
- package/dist/promise/misc.d.mts +10 -7
- package/dist/promise/misc.mjs +4 -3
- package/dist/promise/models.d.mts +18 -19
- package/dist/promise/models.mjs +4 -3
- package/dist/promise/timed.d.mts +8 -6
- package/dist/query.d.mts +2 -0
- package/dist/query.mjs +2 -0
- package/dist/queue.d.mts +15 -4
- package/dist/queue.mjs +10 -3
- package/dist/random.d.mts +9 -2
- package/dist/random.mjs +7 -2
- package/dist/result/index.d.mts +14 -8
- package/dist/result/match.d.mts +18 -10
- package/dist/result/misc.d.mts +14 -7
- package/dist/result/misc.mjs +4 -2
- package/dist/result/models.d.mts +2 -0
- package/dist/result/work/flow.d.mts +86 -62
- package/dist/result/work/pipe.d.mts +55 -33
- package/dist/sized/map.d.mts +19 -16
- package/dist/sized/map.mjs +4 -4
- package/dist/sized/set.d.mts +20 -16
- package/dist/sized/set.mjs +8 -7
- package/dist/string/case.d.mts +8 -0
- package/dist/string/case.mjs +8 -0
- package/dist/string/fuzzy.d.mts +19 -5
- package/dist/string/fuzzy.mjs +7 -0
- package/dist/string/index.d.mts +17 -2
- package/dist/string/index.mjs +7 -9
- package/dist/string/match.d.mts +3 -0
- package/dist/string/match.mjs +3 -0
- package/dist/string/normalize.d.mts +6 -2
- package/dist/string/normalize.mjs +5 -2
- package/dist/string/template.d.mts +38 -9
- package/dist/string/template.mjs +19 -19
- package/dist/value/clone.d.mts +25 -4
- package/dist/value/clone.mjs +36 -22
- package/dist/value/collection.d.mts +9 -6
- package/dist/value/collection.mjs +3 -2
- package/dist/value/diff.d.mts +3 -1
- package/dist/value/diff.mjs +1 -0
- package/dist/value/freeze.d.mts +118 -9
- package/dist/value/freeze.mjs +56 -14
- package/dist/value/index.d.mts +1 -2
- package/dist/value/index.mjs +1 -2
- package/dist/value/merge.d.mts +11 -5
- package/dist/value/merge.mjs +2 -2
- package/dist/value/omit.d.mts +1 -0
- package/dist/value/omit.mjs +1 -0
- package/dist/value/pick.d.mts +1 -0
- package/dist/value/pick.mjs +1 -0
- package/dist/value/shake.d.mts +1 -0
- package/dist/value/shake.mjs +1 -0
- package/dist/value/smush.d.mts +1 -0
- package/dist/value/smush.mjs +1 -0
- package/dist/value/transform.d.mts +7 -3
- package/dist/value/unsmush.d.mts +1 -0
- package/dist/value/unsmush.mjs +1 -0
- package/package.json +11 -7
- package/src/array/filter.ts +4 -4
- package/src/array/find.ts +4 -4
- package/src/array/first.ts +4 -4
- package/src/array/get.ts +40 -5
- package/src/array/group-by.ts +6 -6
- package/src/array/last.ts +4 -4
- package/src/array/match.ts +7 -6
- package/src/array/move.ts +7 -7
- package/src/array/select.ts +1 -0
- package/src/array/slice.ts +3 -3
- package/src/array/sort.ts +15 -10
- package/src/array/swap.ts +1 -1
- package/src/array/to-map.ts +32 -32
- package/src/array/to-record.ts +6 -6
- package/src/array/to-set.ts +6 -6
- package/src/beacon.ts +6 -0
- package/src/color/index.ts +6 -2
- package/src/color/instance.ts +78 -14
- package/src/color/misc/get.ts +39 -11
- package/src/color/misc/is.ts +26 -11
- package/src/color/misc/state.ts +1 -1
- package/src/color/models.ts +7 -4
- package/src/color/space/hex.ts +15 -6
- package/src/color/space/hsl.ts +10 -4
- package/src/color/space/rgb.ts +21 -12
- package/src/function/assert.ts +20 -14
- package/src/function/limit.ts +8 -6
- package/src/function/memoize.ts +24 -5
- package/src/function/once.ts +5 -3
- package/src/function/retry.ts +7 -3
- package/src/function/work.ts +146 -98
- package/src/{kalas.ts → herald.ts} +23 -14
- package/src/index.ts +3 -2
- package/src/internal/array/index-of.ts +4 -4
- package/src/internal/array/insert.ts +1 -1
- package/src/internal/array/shuffle.ts +2 -1
- package/src/internal/is.ts +26 -8
- package/src/internal/math/aggregate.ts +9 -9
- package/src/internal/number.ts +13 -2
- package/src/internal/random.ts +10 -4
- package/src/internal/result.ts +30 -29
- package/src/internal/string.ts +28 -0
- package/src/internal/value/compare.ts +5 -2
- package/src/internal/value/equal.ts +13 -4
- package/src/internal/value/get.ts +17 -17
- package/src/internal/value/has.ts +54 -11
- package/src/internal/value/set.ts +24 -0
- package/src/is.ts +15 -1
- package/src/logger.ts +8 -7
- package/src/math.ts +36 -18
- package/src/models.ts +3 -3
- package/src/promise/delay.ts +2 -0
- package/src/promise/helpers.ts +6 -4
- package/src/promise/index.ts +49 -38
- package/src/promise/misc.ts +10 -7
- package/src/promise/models.ts +18 -19
- package/src/promise/timed.ts +8 -6
- package/src/query.ts +2 -0
- package/src/queue.ts +15 -4
- package/src/random.ts +8 -1
- package/src/result/index.ts +14 -8
- package/src/result/match.ts +18 -10
- package/src/result/misc.ts +17 -9
- package/src/result/models.ts +2 -0
- package/src/result/work/flow.ts +86 -62
- package/src/result/work/pipe.ts +55 -33
- package/src/sized/map.ts +20 -17
- package/src/sized/set.ts +21 -17
- package/src/string/case.ts +8 -0
- package/src/string/fuzzy.ts +19 -5
- package/src/string/index.ts +18 -15
- package/src/string/match.ts +3 -0
- package/src/string/normalize.ts +6 -2
- package/src/string/template.ts +69 -18
- package/src/value/clone.ts +51 -26
- package/src/value/collection.ts +9 -6
- package/src/value/diff.ts +3 -1
- package/src/value/freeze.ts +239 -25
- package/src/value/index.ts +0 -1
- package/src/value/merge.ts +11 -5
- package/src/value/omit.ts +1 -0
- package/src/value/pick.ts +1 -0
- package/src/value/shake.ts +1 -0
- package/src/value/smush.ts +1 -0
- package/src/value/transform.ts +7 -3
- package/src/value/unsmush.ts +1 -0
package/src/function/work.ts
CHANGED
|
@@ -6,14 +6,14 @@ import {assert, type Asserter} from './assert';
|
|
|
6
6
|
// #region Types
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* A synchronous
|
|
9
|
+
* A synchronous _Flow_, a function that pipe a value through a series of functions
|
|
10
10
|
*/
|
|
11
11
|
export type Flow<Callback extends GenericCallback, Value> = (
|
|
12
12
|
...args: Parameters<Callback>
|
|
13
13
|
) => UnwrapValue<Value>;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* An asynchronous
|
|
16
|
+
* An asynchronous _Flow_, a function that pipes a value through a series of functions
|
|
17
17
|
*/
|
|
18
18
|
export type FlowPromise<Callback extends GenericCallback, Value> = (
|
|
19
19
|
...args: Parameters<Callback>
|
|
@@ -28,18 +28,20 @@ export type FlowPromise<Callback extends GenericCallback, Value> = (
|
|
|
28
28
|
// #region Asynchronous
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Create an asynchronous
|
|
31
|
+
* Create an asynchronous _Flow_, a function that pipes values through a function
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
33
|
+
* _Available as `asyncFlow` and `flow.async`_
|
|
34
|
+
*
|
|
35
|
+
* @returns _Flow_ function
|
|
35
36
|
*/
|
|
36
37
|
export function asyncFlow<Fn extends GenericCallback>(fn: Fn): FlowPromise<Fn, ReturnType<Fn>>;
|
|
37
38
|
|
|
38
39
|
/**
|
|
39
|
-
* Create an asynchronous
|
|
40
|
+
* Create an asynchronous _Flow_, a function that pipes values through a series of functions
|
|
41
|
+
*
|
|
42
|
+
* _Available as `asyncFlow` and `flow.async`_
|
|
40
43
|
*
|
|
41
|
-
*
|
|
42
|
-
* @returns Flow function
|
|
44
|
+
* @returns _Flow_ function
|
|
43
45
|
*/
|
|
44
46
|
export function asyncFlow<First extends GenericCallback, Second>(
|
|
45
47
|
first: First,
|
|
@@ -47,10 +49,11 @@ export function asyncFlow<First extends GenericCallback, Second>(
|
|
|
47
49
|
): FlowPromise<First, Second>;
|
|
48
50
|
|
|
49
51
|
/**
|
|
50
|
-
* Create an asynchronous
|
|
52
|
+
* Create an asynchronous _Flow_, a function that pipes values through a series of functions
|
|
53
|
+
*
|
|
54
|
+
* _Available as `asyncFlow` and `flow.async`_
|
|
51
55
|
*
|
|
52
|
-
*
|
|
53
|
-
* @returns Flow function
|
|
56
|
+
* @returns _Flow_ function
|
|
54
57
|
*/
|
|
55
58
|
export function asyncFlow<First extends GenericCallback, Second, Third>(
|
|
56
59
|
first: First,
|
|
@@ -59,10 +62,11 @@ export function asyncFlow<First extends GenericCallback, Second, Third>(
|
|
|
59
62
|
): FlowPromise<First, Third>;
|
|
60
63
|
|
|
61
64
|
/**
|
|
62
|
-
* Create an asynchronous
|
|
65
|
+
* Create an asynchronous _Flow_, a function that pipes values through a series of functions
|
|
63
66
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
67
|
+
* _Available as `asyncFlow` and `flow.async`_
|
|
68
|
+
*
|
|
69
|
+
* @returns _Flow_ function
|
|
66
70
|
*/
|
|
67
71
|
export function asyncFlow<First extends GenericCallback, Second, Third, Fourth>(
|
|
68
72
|
first: First,
|
|
@@ -72,10 +76,11 @@ export function asyncFlow<First extends GenericCallback, Second, Third, Fourth>(
|
|
|
72
76
|
): FlowPromise<First, Fourth>;
|
|
73
77
|
|
|
74
78
|
/**
|
|
75
|
-
* Create an asynchronous
|
|
79
|
+
* Create an asynchronous _Flow_, a function that pipes values through a series of functions
|
|
80
|
+
*
|
|
81
|
+
* _Available as `asyncFlow` and `flow.async`_
|
|
76
82
|
*
|
|
77
|
-
*
|
|
78
|
-
* @returns Flow function
|
|
83
|
+
* @returns _Flow_ function
|
|
79
84
|
*/
|
|
80
85
|
export function asyncFlow<First extends GenericCallback, Second, Third, Fourth, Fifth>(
|
|
81
86
|
first: First,
|
|
@@ -86,10 +91,11 @@ export function asyncFlow<First extends GenericCallback, Second, Third, Fourth,
|
|
|
86
91
|
): FlowPromise<First, Fifth>;
|
|
87
92
|
|
|
88
93
|
/**
|
|
89
|
-
* Create an asynchronous
|
|
94
|
+
* Create an asynchronous _Flow_, a function that pipes values through a series of functions
|
|
95
|
+
*
|
|
96
|
+
* _Available as `asyncFlow` and `flow.async`_
|
|
90
97
|
*
|
|
91
|
-
*
|
|
92
|
-
* @returns Flow function
|
|
98
|
+
* @returns _Flow_ function
|
|
93
99
|
*/
|
|
94
100
|
export function asyncFlow<First extends GenericCallback, Second, Third, Fourth, Fifth, Sixth>(
|
|
95
101
|
first: First,
|
|
@@ -101,10 +107,11 @@ export function asyncFlow<First extends GenericCallback, Second, Third, Fourth,
|
|
|
101
107
|
): FlowPromise<First, Sixth>;
|
|
102
108
|
|
|
103
109
|
/**
|
|
104
|
-
* Create an asynchronous
|
|
110
|
+
* Create an asynchronous _Flow_, a function that pipes values through a series of functions
|
|
105
111
|
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
112
|
+
* _Available as `asyncFlow` and `flow.async`_
|
|
113
|
+
*
|
|
114
|
+
* @returns _Flow_ function
|
|
108
115
|
*/
|
|
109
116
|
export function asyncFlow<
|
|
110
117
|
First extends GenericCallback,
|
|
@@ -125,10 +132,11 @@ export function asyncFlow<
|
|
|
125
132
|
): FlowPromise<First, Seventh>;
|
|
126
133
|
|
|
127
134
|
/**
|
|
128
|
-
* Create an asynchronous
|
|
135
|
+
* Create an asynchronous _Flow_, a function that pipes values through a series of functions
|
|
136
|
+
*
|
|
137
|
+
* _Available as `asyncFlow` and `flow.async`_
|
|
129
138
|
*
|
|
130
|
-
*
|
|
131
|
-
* @returns Flow function
|
|
139
|
+
* @returns _Flow_ function
|
|
132
140
|
*/
|
|
133
141
|
export function asyncFlow<
|
|
134
142
|
First extends GenericCallback,
|
|
@@ -151,10 +159,11 @@ export function asyncFlow<
|
|
|
151
159
|
): FlowPromise<First, Eighth>;
|
|
152
160
|
|
|
153
161
|
/**
|
|
154
|
-
* Create an asynchronous
|
|
162
|
+
* Create an asynchronous _Flow_, a function that pipes values through a series of functions
|
|
163
|
+
*
|
|
164
|
+
* _Available as `asyncFlow` and `flow.async`_
|
|
155
165
|
*
|
|
156
|
-
*
|
|
157
|
-
* @returns Flow function
|
|
166
|
+
* @returns _Flow_ function
|
|
158
167
|
*/
|
|
159
168
|
export function asyncFlow<
|
|
160
169
|
First extends GenericCallback,
|
|
@@ -179,10 +188,11 @@ export function asyncFlow<
|
|
|
179
188
|
): FlowPromise<First, Ninth>;
|
|
180
189
|
|
|
181
190
|
/**
|
|
182
|
-
* Create an asynchronous
|
|
191
|
+
* Create an asynchronous _Flow_, a function that pipes values through a series of functions
|
|
183
192
|
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
193
|
+
* _Available as `asyncFlow` and `flow.async`_
|
|
194
|
+
*
|
|
195
|
+
* @returns _Flow_ function
|
|
186
196
|
*/
|
|
187
197
|
export function asyncFlow<
|
|
188
198
|
First extends GenericCallback,
|
|
@@ -209,10 +219,11 @@ export function asyncFlow<
|
|
|
209
219
|
): FlowPromise<First, Tenth>;
|
|
210
220
|
|
|
211
221
|
/**
|
|
212
|
-
* Create an asynchronous
|
|
222
|
+
* Create an asynchronous _Flow_, a function that pipes values through a series of functions
|
|
223
|
+
*
|
|
224
|
+
* _Available as `asyncFlow` and `flow.async`_
|
|
213
225
|
*
|
|
214
|
-
*
|
|
215
|
-
* @returns Flow function
|
|
226
|
+
* @returns _Flow_ function
|
|
216
227
|
*/
|
|
217
228
|
export function asyncFlow<Fn extends GenericCallback>(
|
|
218
229
|
fn: Fn,
|
|
@@ -220,10 +231,11 @@ export function asyncFlow<Fn extends GenericCallback>(
|
|
|
220
231
|
): FlowPromise<Fn, ReturnType<Fn>>;
|
|
221
232
|
|
|
222
233
|
/**
|
|
223
|
-
* Create an asynchronous
|
|
234
|
+
* Create an asynchronous _Flow_, a function that pipes values through a series of functions
|
|
235
|
+
*
|
|
236
|
+
* _Available as `asyncFlow` and `flow.async`_
|
|
224
237
|
*
|
|
225
|
-
*
|
|
226
|
-
* @returns Flow function
|
|
238
|
+
* @returns _Flow_ function
|
|
227
239
|
*/
|
|
228
240
|
export function asyncFlow(...fns: GenericCallback[]): (...args: unknown[]) => Promise<unknown>;
|
|
229
241
|
|
|
@@ -249,14 +261,16 @@ export function asyncFlow(...fns: GenericCallback[]): (...args: unknown[]) => Pr
|
|
|
249
261
|
// #region Synchronous
|
|
250
262
|
|
|
251
263
|
/**
|
|
252
|
-
* Create a
|
|
253
|
-
*
|
|
264
|
+
* Create a _Flow_, a function that pipes values through a function
|
|
265
|
+
*
|
|
266
|
+
* @returns _Flow_ function
|
|
254
267
|
*/
|
|
255
268
|
export function flow<Fn extends GenericCallback>(fn: Fn): Flow<Fn, ReturnType<Fn>>;
|
|
256
269
|
|
|
257
270
|
/**
|
|
258
|
-
* Create a
|
|
259
|
-
*
|
|
271
|
+
* Create a _Flow_, a function that pipes values through a series of functions
|
|
272
|
+
*
|
|
273
|
+
* @returns _Flow_ function
|
|
260
274
|
*/
|
|
261
275
|
export function flow<First extends GenericCallback, Second>(
|
|
262
276
|
first: First,
|
|
@@ -264,8 +278,9 @@ export function flow<First extends GenericCallback, Second>(
|
|
|
264
278
|
): Flow<First, Second>;
|
|
265
279
|
|
|
266
280
|
/**
|
|
267
|
-
* Create a
|
|
268
|
-
*
|
|
281
|
+
* Create a _Flow_, a function that pipes values through a series of functions
|
|
282
|
+
*
|
|
283
|
+
* @returns _Flow_ function
|
|
269
284
|
*/
|
|
270
285
|
export function flow<First extends GenericCallback, Second, Third>(
|
|
271
286
|
first: First,
|
|
@@ -274,8 +289,9 @@ export function flow<First extends GenericCallback, Second, Third>(
|
|
|
274
289
|
): Flow<First, Third>;
|
|
275
290
|
|
|
276
291
|
/**
|
|
277
|
-
* Create a
|
|
278
|
-
*
|
|
292
|
+
* Create a _Flow_, a function that pipes values through a series of functions
|
|
293
|
+
*
|
|
294
|
+
* @returns _Flow_ function
|
|
279
295
|
*/
|
|
280
296
|
export function flow<First extends GenericCallback, Second, Third, Fourth>(
|
|
281
297
|
first: First,
|
|
@@ -285,8 +301,9 @@ export function flow<First extends GenericCallback, Second, Third, Fourth>(
|
|
|
285
301
|
): Flow<First, Fourth>;
|
|
286
302
|
|
|
287
303
|
/**
|
|
288
|
-
* Create a
|
|
289
|
-
*
|
|
304
|
+
* Create a _Flow_, a function that pipes values through a series of functions
|
|
305
|
+
*
|
|
306
|
+
* @returns _Flow_ function
|
|
290
307
|
*/
|
|
291
308
|
export function flow<First extends GenericCallback, Second, Third, Fourth, Fifth>(
|
|
292
309
|
first: First,
|
|
@@ -297,8 +314,9 @@ export function flow<First extends GenericCallback, Second, Third, Fourth, Fifth
|
|
|
297
314
|
): Flow<First, Fifth>;
|
|
298
315
|
|
|
299
316
|
/**
|
|
300
|
-
* Create a
|
|
301
|
-
*
|
|
317
|
+
* Create a _Flow_, a function that pipes values through a series of functions
|
|
318
|
+
*
|
|
319
|
+
* @returns _Flow_ function
|
|
302
320
|
*/
|
|
303
321
|
export function flow<First extends GenericCallback, Second, Third, Fourth, Fifth, Sixth>(
|
|
304
322
|
first: First,
|
|
@@ -310,8 +328,9 @@ export function flow<First extends GenericCallback, Second, Third, Fourth, Fifth
|
|
|
310
328
|
): Flow<First, Sixth>;
|
|
311
329
|
|
|
312
330
|
/**
|
|
313
|
-
* Create a
|
|
314
|
-
*
|
|
331
|
+
* Create a _Flow_, a function that pipes values through a series of functions
|
|
332
|
+
*
|
|
333
|
+
* @returns _Flow_ function
|
|
315
334
|
*/
|
|
316
335
|
export function flow<First extends GenericCallback, Second, Third, Fourth, Fifth, Sixth, Seventh>(
|
|
317
336
|
first: First,
|
|
@@ -324,8 +343,9 @@ export function flow<First extends GenericCallback, Second, Third, Fourth, Fifth
|
|
|
324
343
|
): Flow<First, Seventh>;
|
|
325
344
|
|
|
326
345
|
/**
|
|
327
|
-
* Create a
|
|
328
|
-
*
|
|
346
|
+
* Create a _Flow_, a function that pipes values through a series of functions
|
|
347
|
+
*
|
|
348
|
+
* @returns _Flow_ function
|
|
329
349
|
*/
|
|
330
350
|
export function flow<
|
|
331
351
|
First extends GenericCallback,
|
|
@@ -348,8 +368,9 @@ export function flow<
|
|
|
348
368
|
): Flow<First, Eighth>;
|
|
349
369
|
|
|
350
370
|
/**
|
|
351
|
-
* Create a
|
|
352
|
-
*
|
|
371
|
+
* Create a _Flow_, a function that pipes values through a series of functions
|
|
372
|
+
*
|
|
373
|
+
* @returns _Flow_ function
|
|
353
374
|
*/
|
|
354
375
|
export function flow<
|
|
355
376
|
First extends GenericCallback,
|
|
@@ -374,8 +395,9 @@ export function flow<
|
|
|
374
395
|
): Flow<First, Ninth>;
|
|
375
396
|
|
|
376
397
|
/**
|
|
377
|
-
* Create a
|
|
378
|
-
*
|
|
398
|
+
* Create a _Flow_, a function that pipes values through a series of functions
|
|
399
|
+
*
|
|
400
|
+
* @returns _Flow_ function
|
|
379
401
|
*/
|
|
380
402
|
export function flow<
|
|
381
403
|
First extends GenericCallback,
|
|
@@ -402,8 +424,9 @@ export function flow<
|
|
|
402
424
|
): Flow<First, Tenth>;
|
|
403
425
|
|
|
404
426
|
/**
|
|
405
|
-
* Create a
|
|
406
|
-
*
|
|
427
|
+
* Create a _Flow_, a function that pipes values through a series of functions
|
|
428
|
+
*
|
|
429
|
+
* @returns _Flow_ function
|
|
407
430
|
*/
|
|
408
431
|
export function flow<First extends GenericCallback>(
|
|
409
432
|
first: First,
|
|
@@ -411,8 +434,9 @@ export function flow<First extends GenericCallback>(
|
|
|
411
434
|
): Flow<First, ReturnType<First>>;
|
|
412
435
|
|
|
413
436
|
/**
|
|
414
|
-
* Create a
|
|
415
|
-
*
|
|
437
|
+
* Create a _Flow_, a function that pipes values through a series of functions
|
|
438
|
+
*
|
|
439
|
+
* @returns _Flow_ function
|
|
416
440
|
*/
|
|
417
441
|
export function flow(...fns: GenericCallback[]): (...args: unknown[]) => unknown;
|
|
418
442
|
|
|
@@ -446,9 +470,10 @@ flow.async = asyncFlow;
|
|
|
446
470
|
/**
|
|
447
471
|
* Pipe a value through a function
|
|
448
472
|
*
|
|
449
|
-
*
|
|
473
|
+
* _Available as `asyncPipe` and `pipe.async`_
|
|
474
|
+
*
|
|
450
475
|
* @param value Initial value
|
|
451
|
-
* @returns
|
|
476
|
+
* @returns _Piped_ result
|
|
452
477
|
*/
|
|
453
478
|
export async function asyncPipe<Initial, Piped>(
|
|
454
479
|
value: Initial,
|
|
@@ -458,9 +483,10 @@ export async function asyncPipe<Initial, Piped>(
|
|
|
458
483
|
/**
|
|
459
484
|
* Pipe a value through a series of functions
|
|
460
485
|
*
|
|
461
|
-
*
|
|
486
|
+
* _Available as `asyncPipe` and `pipe.async`_
|
|
487
|
+
*
|
|
462
488
|
* @param value Initial value
|
|
463
|
-
* @returns
|
|
489
|
+
* @returns _Piped_ result
|
|
464
490
|
*/
|
|
465
491
|
export async function asyncPipe<Initial, First, Second>(
|
|
466
492
|
value: Initial,
|
|
@@ -471,9 +497,10 @@ export async function asyncPipe<Initial, First, Second>(
|
|
|
471
497
|
/**
|
|
472
498
|
* Pipe a value through a series of functions
|
|
473
499
|
*
|
|
474
|
-
*
|
|
500
|
+
* _Available as `asyncPipe` and `pipe.async`_
|
|
501
|
+
*
|
|
475
502
|
* @param value Initial value
|
|
476
|
-
* @returns
|
|
503
|
+
* @returns _Piped_ result
|
|
477
504
|
*/
|
|
478
505
|
export async function asyncPipe<Initial, First, Second, Third>(
|
|
479
506
|
value: Initial,
|
|
@@ -485,9 +512,10 @@ export async function asyncPipe<Initial, First, Second, Third>(
|
|
|
485
512
|
/**
|
|
486
513
|
* Pipe a value through a series of functions
|
|
487
514
|
*
|
|
488
|
-
*
|
|
515
|
+
* _Available as `asyncPipe` and `pipe.async`_
|
|
516
|
+
*
|
|
489
517
|
* @param value Initial value
|
|
490
|
-
* @returns
|
|
518
|
+
* @returns _Piped_ result
|
|
491
519
|
*/
|
|
492
520
|
export async function asyncPipe<Initial, First, Second, Third, Fourth>(
|
|
493
521
|
value: Initial,
|
|
@@ -500,9 +528,10 @@ export async function asyncPipe<Initial, First, Second, Third, Fourth>(
|
|
|
500
528
|
/**
|
|
501
529
|
* Pipe a value through a series of functions
|
|
502
530
|
*
|
|
503
|
-
*
|
|
531
|
+
* _Available as `asyncPipe` and `pipe.async`_
|
|
532
|
+
*
|
|
504
533
|
* @param value Initial value
|
|
505
|
-
* @returns
|
|
534
|
+
* @returns _Piped_ result
|
|
506
535
|
*/
|
|
507
536
|
export async function asyncPipe<Initial, First, Second, Third, Fourth, Fifth>(
|
|
508
537
|
value: Initial,
|
|
@@ -516,9 +545,10 @@ export async function asyncPipe<Initial, First, Second, Third, Fourth, Fifth>(
|
|
|
516
545
|
/**
|
|
517
546
|
* Pipe a value through a series of functions
|
|
518
547
|
*
|
|
519
|
-
*
|
|
548
|
+
* _Available as `asyncPipe` and `pipe.async`_
|
|
549
|
+
*
|
|
520
550
|
* @param value Initial value
|
|
521
|
-
* @returns
|
|
551
|
+
* @returns _Piped_ result
|
|
522
552
|
*/
|
|
523
553
|
export async function asyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth>(
|
|
524
554
|
value: Initial,
|
|
@@ -533,9 +563,10 @@ export async function asyncPipe<Initial, First, Second, Third, Fourth, Fifth, Si
|
|
|
533
563
|
/**
|
|
534
564
|
* Pipe a value through a series of functions
|
|
535
565
|
*
|
|
536
|
-
*
|
|
566
|
+
* _Available as `asyncPipe` and `pipe.async`_
|
|
567
|
+
*
|
|
537
568
|
* @param value Initial value
|
|
538
|
-
* @returns
|
|
569
|
+
* @returns _Piped_ result
|
|
539
570
|
*/
|
|
540
571
|
export async function asyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh>(
|
|
541
572
|
value: Initial,
|
|
@@ -551,9 +582,10 @@ export async function asyncPipe<Initial, First, Second, Third, Fourth, Fifth, Si
|
|
|
551
582
|
/**
|
|
552
583
|
* Pipe a value through a series of functions
|
|
553
584
|
*
|
|
554
|
-
*
|
|
585
|
+
* _Available as `asyncPipe` and `pipe.async`_
|
|
586
|
+
*
|
|
555
587
|
* @param value Initial value
|
|
556
|
-
* @returns
|
|
588
|
+
* @returns _Piped_ result
|
|
557
589
|
*/
|
|
558
590
|
export async function asyncPipe<
|
|
559
591
|
Initial,
|
|
@@ -580,9 +612,10 @@ export async function asyncPipe<
|
|
|
580
612
|
/**
|
|
581
613
|
* Pipe a value through a series of functions
|
|
582
614
|
*
|
|
583
|
-
*
|
|
615
|
+
* _Available as `asyncPipe` and `pipe.async`_
|
|
616
|
+
*
|
|
584
617
|
* @param value Initial value
|
|
585
|
-
* @returns
|
|
618
|
+
* @returns _Piped_ result
|
|
586
619
|
*/
|
|
587
620
|
export async function asyncPipe<
|
|
588
621
|
Initial,
|
|
@@ -611,9 +644,10 @@ export async function asyncPipe<
|
|
|
611
644
|
/**
|
|
612
645
|
* Pipe a value through a series of functions
|
|
613
646
|
*
|
|
614
|
-
*
|
|
647
|
+
* _Available as `asyncPipe` and `pipe.async`_
|
|
648
|
+
*
|
|
615
649
|
* @param value Initial value
|
|
616
|
-
* @returns
|
|
650
|
+
* @returns _Piped_ result
|
|
617
651
|
*/
|
|
618
652
|
export async function asyncPipe<
|
|
619
653
|
Initial,
|
|
@@ -644,9 +678,10 @@ export async function asyncPipe<
|
|
|
644
678
|
/**
|
|
645
679
|
* Pipe a value through a series of functions
|
|
646
680
|
*
|
|
647
|
-
*
|
|
681
|
+
* _Available as `asyncPipe` and `pipe.async`_
|
|
682
|
+
*
|
|
648
683
|
* @param value Initial value
|
|
649
|
-
* @returns
|
|
684
|
+
* @returns _Piped_ result
|
|
650
685
|
*/
|
|
651
686
|
export async function asyncPipe<Value>(
|
|
652
687
|
value: Value,
|
|
@@ -656,9 +691,10 @@ export async function asyncPipe<Value>(
|
|
|
656
691
|
/**
|
|
657
692
|
* Pipe a value through a series of functions
|
|
658
693
|
*
|
|
659
|
-
*
|
|
694
|
+
* _Available as `asyncPipe` and `pipe.async`_
|
|
695
|
+
*
|
|
660
696
|
* @param value Initial value
|
|
661
|
-
* @returns
|
|
697
|
+
* @returns _Piped_ result
|
|
662
698
|
*/
|
|
663
699
|
export async function asyncPipe(
|
|
664
700
|
value: unknown,
|
|
@@ -680,8 +716,9 @@ export async function asyncPipe(
|
|
|
680
716
|
|
|
681
717
|
/**
|
|
682
718
|
* Pipe a value through a function
|
|
719
|
+
*
|
|
683
720
|
* @param value Initial value
|
|
684
|
-
* @returns
|
|
721
|
+
* @returns _Piped_ result
|
|
685
722
|
*/
|
|
686
723
|
export function pipe<Initial, Piped>(
|
|
687
724
|
value: Initial,
|
|
@@ -690,8 +727,9 @@ export function pipe<Initial, Piped>(
|
|
|
690
727
|
|
|
691
728
|
/**
|
|
692
729
|
* Pipe a value through a series of functions
|
|
730
|
+
*
|
|
693
731
|
* @param value Initial value
|
|
694
|
-
* @returns
|
|
732
|
+
* @returns _Piped_ result
|
|
695
733
|
*/
|
|
696
734
|
export function pipe<Initial, First, Second>(
|
|
697
735
|
value: Initial,
|
|
@@ -701,8 +739,9 @@ export function pipe<Initial, First, Second>(
|
|
|
701
739
|
|
|
702
740
|
/**
|
|
703
741
|
* Pipe a value through a series of functions
|
|
742
|
+
*
|
|
704
743
|
* @param value Initial value
|
|
705
|
-
* @returns
|
|
744
|
+
* @returns _Piped_ result
|
|
706
745
|
*/
|
|
707
746
|
export function pipe<Initial, First, Second, Third>(
|
|
708
747
|
value: Initial,
|
|
@@ -713,8 +752,9 @@ export function pipe<Initial, First, Second, Third>(
|
|
|
713
752
|
|
|
714
753
|
/**
|
|
715
754
|
* Pipe a value through a series of functions
|
|
755
|
+
*
|
|
716
756
|
* @param value Initial value
|
|
717
|
-
* @returns
|
|
757
|
+
* @returns _Piped_ result
|
|
718
758
|
*/
|
|
719
759
|
export function pipe<Initial, First, Second, Third, Fourth>(
|
|
720
760
|
value: Initial,
|
|
@@ -726,8 +766,9 @@ export function pipe<Initial, First, Second, Third, Fourth>(
|
|
|
726
766
|
|
|
727
767
|
/**
|
|
728
768
|
* Pipe a value through a series of functions
|
|
769
|
+
*
|
|
729
770
|
* @param value Initial value
|
|
730
|
-
* @returns
|
|
771
|
+
* @returns _Piped_ result
|
|
731
772
|
*/
|
|
732
773
|
export function pipe<Initial, First, Second, Third, Fourth, Fifth>(
|
|
733
774
|
value: Initial,
|
|
@@ -740,8 +781,9 @@ export function pipe<Initial, First, Second, Third, Fourth, Fifth>(
|
|
|
740
781
|
|
|
741
782
|
/**
|
|
742
783
|
* Pipe a value through a series of functions
|
|
784
|
+
*
|
|
743
785
|
* @param value Initial value
|
|
744
|
-
* @returns
|
|
786
|
+
* @returns _Piped_ result
|
|
745
787
|
*/
|
|
746
788
|
export function pipe<Initial, First, Second, Third, Fourth, Fifth, Sixth>(
|
|
747
789
|
value: Initial,
|
|
@@ -755,8 +797,9 @@ export function pipe<Initial, First, Second, Third, Fourth, Fifth, Sixth>(
|
|
|
755
797
|
|
|
756
798
|
/**
|
|
757
799
|
* Pipe a value through a series of functions
|
|
800
|
+
*
|
|
758
801
|
* @param value Initial value
|
|
759
|
-
* @returns
|
|
802
|
+
* @returns _Piped_ result
|
|
760
803
|
*/
|
|
761
804
|
export function pipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh>(
|
|
762
805
|
value: Initial,
|
|
@@ -771,8 +814,9 @@ export function pipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Sevent
|
|
|
771
814
|
|
|
772
815
|
/**
|
|
773
816
|
* Pipe a value through a series of functions
|
|
817
|
+
*
|
|
774
818
|
* @param value Initial value
|
|
775
|
-
* @returns
|
|
819
|
+
* @returns _Piped_ result
|
|
776
820
|
*/
|
|
777
821
|
export function pipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(
|
|
778
822
|
value: Initial,
|
|
@@ -788,8 +832,9 @@ export function pipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Sevent
|
|
|
788
832
|
|
|
789
833
|
/**
|
|
790
834
|
* Pipe a value through a series of functions
|
|
835
|
+
*
|
|
791
836
|
* @param value Initial value
|
|
792
|
-
* @returns
|
|
837
|
+
* @returns _Piped_ result
|
|
793
838
|
*/
|
|
794
839
|
export function pipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth>(
|
|
795
840
|
value: Initial,
|
|
@@ -806,8 +851,9 @@ export function pipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Sevent
|
|
|
806
851
|
|
|
807
852
|
/**
|
|
808
853
|
* Pipe a value through a series of functions
|
|
854
|
+
*
|
|
809
855
|
* @param value Initial value
|
|
810
|
-
* @returns
|
|
856
|
+
* @returns _Piped_ result
|
|
811
857
|
*/
|
|
812
858
|
export function pipe<
|
|
813
859
|
Initial,
|
|
@@ -837,8 +883,9 @@ export function pipe<
|
|
|
837
883
|
|
|
838
884
|
/**
|
|
839
885
|
* Pipe a value through a series of functions
|
|
886
|
+
*
|
|
840
887
|
* @param value Initial value
|
|
841
|
-
* @returns
|
|
888
|
+
* @returns _Piped_ result
|
|
842
889
|
*/
|
|
843
890
|
export function pipe<Value>(
|
|
844
891
|
value: Value,
|
|
@@ -847,8 +894,9 @@ export function pipe<Value>(
|
|
|
847
894
|
|
|
848
895
|
/**
|
|
849
896
|
* Pipe a value through a series of functions
|
|
897
|
+
*
|
|
850
898
|
* @param value Initial value
|
|
851
|
-
* @returns
|
|
899
|
+
* @returns _Piped_ result
|
|
852
900
|
*/
|
|
853
901
|
export function pipe(value: unknown, ...pipes: Array<(value: unknown) => unknown>): unknown;
|
|
854
902
|
|