@oscarpalmer/atoms 0.179.0 → 0.180.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.
Files changed (100) hide show
  1. package/dist/array/filter.d.mts +36 -28
  2. package/dist/array/filter.mjs +5 -5
  3. package/dist/array/first.d.mts +13 -5
  4. package/dist/array/first.mjs +1 -1
  5. package/dist/array/group-by.d.mts +13 -1
  6. package/dist/array/group-by.mjs +1 -1
  7. package/dist/array/last.d.mts +9 -1
  8. package/dist/array/last.mjs +1 -1
  9. package/dist/array/move.d.mts +9 -1
  10. package/dist/array/move.mjs +3 -1
  11. package/dist/array/reverse.d.mts +5 -0
  12. package/dist/array/reverse.mjs +5 -0
  13. package/dist/array/select.d.mts +2 -2
  14. package/dist/array/sort.d.mts +23 -9
  15. package/dist/array/sort.mjs +22 -22
  16. package/dist/array/swap.d.mts +2 -0
  17. package/dist/array/swap.mjs +2 -0
  18. package/dist/array/to-map.d.mts +13 -1
  19. package/dist/array/to-map.mjs +1 -1
  20. package/dist/array/to-record.d.mts +13 -1
  21. package/dist/array/to-record.mjs +1 -1
  22. package/dist/function/assert.d.mts +9 -1
  23. package/dist/function/assert.mjs +9 -1
  24. package/dist/function/limit.d.mts +5 -1
  25. package/dist/function/limit.mjs +5 -1
  26. package/dist/function/once.d.mts +3 -1
  27. package/dist/function/once.mjs +3 -1
  28. package/dist/function/retry.d.mts +4 -0
  29. package/dist/function/retry.mjs +2 -0
  30. package/dist/function/work.d.mts +49 -1
  31. package/dist/function/work.mjs +1 -1
  32. package/dist/index.d.mts +415 -242
  33. package/dist/index.mjs +224 -167
  34. package/dist/internal/array/index-of.mjs +1 -1
  35. package/dist/internal/function/timer.mjs +3 -1
  36. package/dist/internal/value/compare.d.mts +13 -9
  37. package/dist/internal/value/compare.mjs +13 -9
  38. package/dist/internal/value/equal.d.mts +29 -15
  39. package/dist/internal/value/equal.mjs +41 -35
  40. package/dist/internal/value/handlers.d.mts +4 -4
  41. package/dist/internal/value/handlers.mjs +19 -11
  42. package/dist/internal/value/has.d.mts +9 -8
  43. package/dist/internal/value/has.mjs +3 -3
  44. package/dist/internal/value/misc.d.mts +4 -8
  45. package/dist/internal/value/misc.mjs +6 -17
  46. package/dist/promise/index.d.mts +11 -1
  47. package/dist/promise/index.mjs +1 -1
  48. package/dist/result/index.d.mts +9 -1
  49. package/dist/result/index.mjs +1 -1
  50. package/dist/result/match.d.mts +5 -1
  51. package/dist/result/match.mjs +1 -1
  52. package/dist/result/misc.d.mts +3 -3
  53. package/dist/result/work/flow.d.mts +49 -1
  54. package/dist/result/work/flow.mjs +1 -1
  55. package/dist/result/work/pipe.d.mts +67 -155
  56. package/dist/result/work/pipe.mjs +3 -3
  57. package/dist/string/fuzzy.d.mts +11 -1
  58. package/dist/string/fuzzy.mjs +22 -6
  59. package/dist/string/template.d.mts +3 -1
  60. package/dist/string/template.mjs +3 -1
  61. package/dist/value/clone.d.mts +13 -9
  62. package/dist/value/clone.mjs +21 -17
  63. package/dist/value/merge.d.mts +9 -7
  64. package/dist/value/merge.mjs +7 -5
  65. package/package.json +3 -3
  66. package/plugin/helpers.js +2 -2
  67. package/src/array/filter.ts +44 -36
  68. package/src/array/first.ts +18 -9
  69. package/src/array/group-by.ts +22 -10
  70. package/src/array/last.ts +17 -5
  71. package/src/array/move.ts +18 -5
  72. package/src/array/reverse.ts +5 -0
  73. package/src/array/select.ts +2 -2
  74. package/src/array/sort.ts +110 -86
  75. package/src/array/swap.ts +2 -0
  76. package/src/array/to-map.ts +22 -10
  77. package/src/array/to-record.ts +22 -10
  78. package/src/function/assert.ts +12 -4
  79. package/src/function/limit.ts +6 -2
  80. package/src/function/once.ts +3 -1
  81. package/src/function/retry.ts +8 -2
  82. package/src/function/work.ts +92 -26
  83. package/src/internal/array/index-of.ts +1 -1
  84. package/src/internal/function/timer.ts +4 -2
  85. package/src/internal/string.ts +2 -0
  86. package/src/internal/value/compare.ts +14 -11
  87. package/src/internal/value/equal.ts +79 -67
  88. package/src/internal/value/handlers.ts +19 -11
  89. package/src/internal/value/has.ts +16 -16
  90. package/src/internal/value/misc.ts +10 -8
  91. package/src/promise/index.ts +14 -4
  92. package/src/result/index.ts +15 -5
  93. package/src/result/match.ts +7 -3
  94. package/src/result/misc.ts +3 -3
  95. package/src/result/work/flow.ts +68 -13
  96. package/src/result/work/pipe.ts +97 -392
  97. package/src/string/fuzzy.ts +34 -8
  98. package/src/string/template.ts +3 -1
  99. package/src/value/clone.ts +25 -22
  100. package/src/value/merge.ts +14 -12
package/dist/index.d.mts CHANGED
@@ -146,68 +146,76 @@ type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint
146
146
  //#endregion
147
147
  //#region src/array/filter.d.ts
148
148
  /**
149
- * Get a filtered array of items
149
+ * Get a filtered array of items that do not match the filter
150
+ *
151
+ * Available as `exclude` and `filter.remove`
150
152
  * @param array Array to search in
151
153
  * @param callback Callback to get an item's value for matching
152
154
  * @param value Value to match against
153
- * @returns Filtered array of items
155
+ * @returns Filtered array of items that do not match the filter
154
156
  */
155
- declare function filter<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): Item[];
157
+ declare function exclude<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): unknown[];
156
158
  /**
157
- * Get a filtered array of items
159
+ * Get a filtered array of items that do not match the filter
160
+ *
161
+ * Available as `exclude` and `filter.remove`
158
162
  * @param array Array to search in
159
163
  * @param key Key to get an item's value for matching
160
164
  * @param value Value to match against
161
- * @returns Filtered array of items
165
+ * @returns Filtered array of items that do not match the filter
162
166
  */
163
- declare function filter<Item extends PlainObject, ItemKey extends keyof Item>(array: Item[], key: ItemKey, value: Item[ItemKey]): Item[];
167
+ declare function exclude<Item extends PlainObject, ItemKey extends keyof Item>(array: Item[], key: ItemKey, value: Item[ItemKey]): unknown[];
164
168
  /**
165
- * Get a filtered array of items matching the filter
169
+ * Get a filtered array of items that do not match the filter
170
+ *
171
+ * Available as `exclude` and `filter.remove`
166
172
  * @param array Array to search in
167
173
  * @param filter Filter callback to match items
168
- * @returns Filtered array of items
174
+ * @returns Filtered array of items that do not match the filter
169
175
  */
170
- declare function filter<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): Item[];
176
+ declare function exclude<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): unknown[];
171
177
  /**
172
- * Get a filtered array of items matching the given item
178
+ * Get a filtered array of items that do not match the given item
179
+ *
180
+ * Available as `exclude` and `filter.remove`
173
181
  * @param array Array to search in
174
182
  * @param item Item to match against
175
- * @returns Filtered array of items
183
+ * @returns Filtered array of items that do not match the given item
176
184
  */
177
- declare function filter<Item>(array: Item[], item: Item): Item[];
178
- declare namespace filter {
179
- var remove: typeof removeFiltered;
180
- }
185
+ declare function exclude<Item>(array: Item[], item: Item): unknown[];
181
186
  /**
182
- * Get a filtered array of items that do not match the filter
187
+ * Get a filtered array of items
183
188
  * @param array Array to search in
184
189
  * @param callback Callback to get an item's value for matching
185
190
  * @param value Value to match against
186
- * @returns Filtered array of items that do not match the filter
191
+ * @returns Filtered array of items
187
192
  */
188
- declare function removeFiltered<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): unknown[];
193
+ declare function filter<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): Item[];
189
194
  /**
190
- * Get a filtered array of items that do not match the filter
195
+ * Get a filtered array of items
191
196
  * @param array Array to search in
192
197
  * @param key Key to get an item's value for matching
193
198
  * @param value Value to match against
194
- * @returns Filtered array of items that do not match the filter
199
+ * @returns Filtered array of items
195
200
  */
196
- declare function removeFiltered<Item extends PlainObject, ItemKey extends keyof Item>(array: Item[], key: ItemKey, value: Item[ItemKey]): unknown[];
201
+ declare function filter<Item extends PlainObject, ItemKey extends keyof Item>(array: Item[], key: ItemKey, value: Item[ItemKey]): Item[];
197
202
  /**
198
- * Get a filtered array of items that do not match the filter
203
+ * Get a filtered array of items matching the filter
199
204
  * @param array Array to search in
200
205
  * @param filter Filter callback to match items
201
- * @returns Filtered array of items that do not match the filter
206
+ * @returns Filtered array of items
202
207
  */
203
- declare function removeFiltered<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): unknown[];
208
+ declare function filter<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): Item[];
204
209
  /**
205
- * Get a filtered array of items that do not match the given item
210
+ * Get a filtered array of items matching the given item
206
211
  * @param array Array to search in
207
212
  * @param item Item to match against
208
- * @returns Filtered array of items that do not match the given item
213
+ * @returns Filtered array of items
209
214
  */
210
- declare function removeFiltered<Item>(array: Item[], item: Item): unknown[];
215
+ declare function filter<Item>(array: Item[], item: Item): Item[];
216
+ declare namespace filter {
217
+ var remove: typeof exclude;
218
+ }
211
219
  //#endregion
212
220
  //#region src/array/first.d.ts
213
221
  /**
@@ -244,7 +252,9 @@ declare namespace first {
244
252
  export { _a as default };
245
253
  }
246
254
  /**
247
- * Get the first item matching the given value
255
+ * Get the first item matching the given value, or a default value if no match is found
256
+ *
257
+ * Available as `firstOrDefault` and `first.default`
248
258
  * @param array Array to search in
249
259
  * @param defaultValue Default value to return if no match is found
250
260
  * @param callback Callback to get an item's value for matching
@@ -253,7 +263,9 @@ declare namespace first {
253
263
  */
254
264
  declare function firstOrDefault<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], defaultValue: Item, callback: Callback, value: ReturnType<Callback>): Item;
255
265
  /**
256
- * Get the first item matching the given value by key
266
+ * Get the first item matching the given value by key, or a default value if no match is found
267
+ *
268
+ * Available as `firstOrDefault` and `first.default`
257
269
  * @param array Array to search in
258
270
  * @param defaultValue Default value to return if no match is found
259
271
  * @param key Key to get an item's value for matching
@@ -262,7 +274,9 @@ declare function firstOrDefault<Item, Callback extends (item: Item, index: numbe
262
274
  */
263
275
  declare function firstOrDefault<Item extends PlainObject, ItemKey extends keyof Item>(array: Item[], defaultValue: Item, key: ItemKey, value: Item[ItemKey]): Item;
264
276
  /**
265
- * Get the first item matching the filter
277
+ * Get the first item matching the filter, or a default value if no match is found
278
+ *
279
+ * Available as `firstOrDefault` and `first.default`
266
280
  * @param array Array to search in
267
281
  * @param defaultValue Default value to return if no match is found
268
282
  * @param filter Filter callback to match items
@@ -270,7 +284,9 @@ declare function firstOrDefault<Item extends PlainObject, ItemKey extends keyof
270
284
  */
271
285
  declare function firstOrDefault<Item>(array: Item[], defaultValue: Item, filter: (item: Item, index: number, array: Item[]) => boolean): Item;
272
286
  /**
273
- * Get the first item from an array
287
+ * Get the first item from an array, or a default value if the array is empty
288
+ *
289
+ * Available as `firstOrDefault` and `first.default`
274
290
  * @param array Array to get from
275
291
  * @param defaultValue Default value to return if the array is empty
276
292
  * @return First item from the array, or the default value if the array is empty
@@ -347,6 +363,8 @@ declare namespace groupBy {
347
363
  }
348
364
  /**
349
365
  * Create a record from an array of items using a specific key and value, grouping values into arrays
366
+ *
367
+ * Available as `groupArraysBy` and `groupBy.arrays`
350
368
  * @param array Array to group
351
369
  * @param key Callback to get an item's grouping key
352
370
  * @param value Callback to get an item's value
@@ -355,6 +373,8 @@ declare namespace groupBy {
355
373
  declare function groupArraysBy<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Record<ReturnType<KeyCallback>, ReturnType<ValueCallback>[]>;
356
374
  /**
357
375
  * Create a record from an array of items using a specific key and value, grouping values into arrays
376
+ *
377
+ * Available as `groupArraysBy` and `groupBy.arrays`
358
378
  * @param array Array to group
359
379
  * @param key Callback to get an item's grouping key
360
380
  * @param value Key to use for value
@@ -363,6 +383,8 @@ declare function groupArraysBy<Item, KeyCallback extends (item: Item, index: num
363
383
  declare function groupArraysBy<Item extends PlainObject, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ItemValue extends keyof Item>(array: Item[], key: KeyCallback, value: ItemValue): Record<ReturnType<KeyCallback>, Item[ItemValue][]>;
364
384
  /**
365
385
  * Create a record from an array of items using a specific key and value, grouping values into arrays
386
+ *
387
+ * Available as `groupArraysBy` and `groupBy.arrays`
366
388
  * @param array Array to group
367
389
  * @param key Key to use for grouping
368
390
  * @param value Callback to get an item's value
@@ -371,6 +393,8 @@ declare function groupArraysBy<Item extends PlainObject, KeyCallback extends (it
371
393
  declare function groupArraysBy<Item extends PlainObject, ItemKey extends keyof Item, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: ItemKey, value: ValueCallback): Simplify<Record<KeyedValue<Item, ItemKey>, ReturnType<ValueCallback>[]>>;
372
394
  /**
373
395
  * Create a record from an array of items using a specific key and value, grouping values into arrays
396
+ *
397
+ * Available as `groupArraysBy` and `groupBy.arrays`
374
398
  * @param array Array to group
375
399
  * @param key Key to use for grouping
376
400
  * @param value Key to use for value
@@ -379,6 +403,8 @@ declare function groupArraysBy<Item extends PlainObject, ItemKey extends keyof I
379
403
  declare function groupArraysBy<Item extends PlainObject, ItemKey extends keyof Item, ItemValue extends keyof Item>(array: Item[], key: ItemKey, value: ItemValue): Simplify<Record<KeyedValue<Item, ItemKey>, Item[ItemValue][]>>;
380
404
  /**
381
405
  * Create a record from an array of items using a specific key, grouping items into arrays
406
+ *
407
+ * Available as `groupArraysBy` and `groupBy.arrays`
382
408
  * @param array Array to group
383
409
  * @param callback Callback to get an item's grouping key
384
410
  * @returns Record of keyed items
@@ -386,6 +412,8 @@ declare function groupArraysBy<Item extends PlainObject, ItemKey extends keyof I
386
412
  declare function groupArraysBy<Item, Callback extends (item: Item, index: number, array: Item[]) => Key>(array: Item[], callback: Callback): Record<ReturnType<Callback>, Item[]>;
387
413
  /**
388
414
  * Create a record from an array of items using a specific key, grouping items into arrays
415
+ *
416
+ * Available as `groupArraysBy` and `groupBy.arrays`
389
417
  * @param array Array to group
390
418
  * @param key Key to use for grouping
391
419
  * @returns Record of keyed items
@@ -830,6 +858,11 @@ declare function startsWithArray<Item>(haystack: Item[], needle: Item[]): boolea
830
858
  declare function push<Item>(array: Item[], pushed: Item[]): number;
831
859
  //#endregion
832
860
  //#region src/array/reverse.d.ts
861
+ /**
862
+ * Reverse the order of items in an array
863
+ * @param array Array to reverse
864
+ * @returns Reversed array
865
+ */
833
866
  declare function reverse<Item>(array: Item[]): Item[];
834
867
  //#endregion
835
868
  //#region src/array/select.d.ts
@@ -908,7 +941,7 @@ declare function select<Item extends PlainObject, MapKey extends keyof Item>(arr
908
941
  * @param map Callback to map the matched items
909
942
  * @returns Filtered and mapped array of items
910
943
  */
911
- declare function select<Item, MapCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], filter: Item, map: MapCallback): Array<ReturnType<MapCallback>>;
944
+ declare function select<Item, MapCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], item: Item, map: MapCallback): Array<ReturnType<MapCallback>>;
912
945
  /**
913
946
  * Get a filtered and mapped array of items
914
947
  * @param array Array to search in
@@ -916,7 +949,7 @@ declare function select<Item, MapCallback extends (item: Item, index: number, ar
916
949
  * @param map Key to get an item's value for mapping
917
950
  * @returns Filtered and mapped array of items
918
951
  */
919
- declare function select<Item extends PlainObject, MapKey extends keyof Item>(array: Item[], filter: Item, map: MapKey): Array<Item[MapKey]>;
952
+ declare function select<Item extends PlainObject, MapKey extends keyof Item>(array: Item[], item: Item, map: MapKey): Array<Item[MapKey]>;
920
953
  //#endregion
921
954
  //#region src/array/single.d.ts
922
955
  /**
@@ -1221,6 +1254,8 @@ declare namespace last {
1221
1254
  }
1222
1255
  /**
1223
1256
  * Get the last item matching the given value
1257
+ *
1258
+ * Available as `lastOrDefault` and `last.default`
1224
1259
  * @param array Array to search in
1225
1260
  * @param defaultValue Default value to return if no match is found
1226
1261
  * @param callback Callback to get an item's value for matching
@@ -1230,6 +1265,8 @@ declare namespace last {
1230
1265
  declare function lastOrDefault<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], defaultValue: Item, callback: Callback, value: ReturnType<Callback>): Item;
1231
1266
  /**
1232
1267
  * Get the last item matching the given value by key
1268
+ *
1269
+ * Available as `lastOrDefault` and `last.default`
1233
1270
  * @param array Array to search in
1234
1271
  * @param defaultValue Default value to return if no match is found
1235
1272
  * @param key Key to get an item's value for matching
@@ -1239,6 +1276,8 @@ declare function lastOrDefault<Item, Callback extends (item: Item, index: number
1239
1276
  declare function lastOrDefault<Item extends PlainObject, ItemKey extends keyof Item>(array: Item[], defaultValue: Item, key: ItemKey, value: Item[ItemKey]): Item;
1240
1277
  /**
1241
1278
  * Get the last item matching the filter
1279
+ *
1280
+ * Available as `lastOrDefault` and `last.default`
1242
1281
  * @param array Array to search in
1243
1282
  * @param defaultValue Default value to return if no match is found
1244
1283
  * @param filter Filter callback to match items
@@ -1247,6 +1286,8 @@ declare function lastOrDefault<Item extends PlainObject, ItemKey extends keyof I
1247
1286
  declare function lastOrDefault<Item>(array: Item[], defaultValue: Item, filter: (item: Item, index: number, array: Item[]) => boolean): Item;
1248
1287
  /**
1249
1288
  * Get the last item from an array
1289
+ *
1290
+ * Available as `lastOrDefault` and `last.default`
1250
1291
  * @param array Array to get from
1251
1292
  * @param defaultValue Default value to return if the array is empty
1252
1293
  * @return Last item from the array, or the default value if the array is empty
@@ -1300,6 +1341,8 @@ declare namespace move {
1300
1341
  * Move an item from one index to another within an array
1301
1342
  *
1302
1343
  * If the from index is out of bounds, the array will be returned unchanged
1344
+ *
1345
+ * Available as `moveIndices` and `move.indices`
1303
1346
  * @param array Array to move within
1304
1347
  * @param from Index to move from
1305
1348
  * @param to Index to move to
@@ -1310,6 +1353,8 @@ declare function moveIndices<Item>(array: Item[], from: number, to: number): Ite
1310
1353
  * Move an item _(or array of items)_ to an index within an array
1311
1354
  *
1312
1355
  * If the value is not present in the array, or if the index is out of bounds, the array will be returned unchanged
1356
+ *
1357
+ * Available as `moveToIndex` and `move.toIndex`
1313
1358
  * @param array Array to move within
1314
1359
  * @param value Item or items to move
1315
1360
  * @param index Index to move to
@@ -1321,6 +1366,8 @@ declare function moveToIndex<Item extends PlainObject, ItemKey extends keyof Ite
1321
1366
  * Move an item _(or array of items)_ to an index within an array
1322
1367
  *
1323
1368
  * If the value is not present in the array, or if the index is out of bounds, the array will be returned unchanged
1369
+ *
1370
+ * Available as `moveToIndex` and `move.toIndex`
1324
1371
  * @param array Array to move within
1325
1372
  * @param value Item or items to move
1326
1373
  * @param index Index to move to
@@ -1332,6 +1379,8 @@ declare function moveToIndex<Item>(array: Item[], value: Item | Item[], index: n
1332
1379
  * Move an item _(or array of items)_ to an index within an array
1333
1380
  *
1334
1381
  * If the value is not present in the array, or if the index is out of bounds, the array will be returned unchanged
1382
+ *
1383
+ * Available as `moveToIndex` and `move.toIndex`
1335
1384
  * @param array Array to move within
1336
1385
  * @param value Item or items to move
1337
1386
  * @param index Index to move to
@@ -1431,54 +1480,66 @@ type Sorter<Item> = {
1431
1480
  * Get the index for an item _(to be inserted into an array of items)_ based on sorters _(and an optional default direction)_
1432
1481
  *
1433
1482
  * _(If the array is not sorted, it will be treated as sorted, and the result may be inaccurate)_
1483
+ *
1484
+ * Available as `getSortedIndex` and `sort.index`
1434
1485
  * @param array Array to get the index from
1435
1486
  * @param item Item to get the index for
1436
1487
  * @param sorters Sorters to use to determine sorting
1437
1488
  * @param descending Sorted in descending order? _(defaults to `false`; overridden by individual sorters)_
1438
1489
  * @returns Index for item
1439
1490
  */
1440
- declare function getIndex<Item>(array: Item[], item: Item, sorters: Array<ArraySorter<Item>>, descending?: boolean): number;
1491
+ declare function getSortedIndex<Item>(array: Item[], item: Item, sorters: Array<ArraySorter<Item>>, descending?: boolean): number;
1441
1492
  /**
1442
1493
  * Get the index for an item _(to be inserted into an array of items)_ based on a sorter _(and an optional default direction)_
1443
1494
  *
1444
1495
  * _(If the array is not sorted, it will be treated as sorted, and the result may be inaccurate)_
1496
+ *
1497
+ * Available as `getSortedIndex` and `sort.index`
1445
1498
  * @param array Array to get the index from
1446
1499
  * @param item Item to get the index for
1447
1500
  * @param sorter Sorter to use to determine sorting
1448
1501
  * @param descending Sorted in descending order? _(defaults to `false`; overridden by individual sorters)_
1449
1502
  * @returns Index for item
1450
1503
  */
1451
- declare function getIndex<Item>(array: Item[], item: Item, sorter: ArraySorter<Item>, descending?: boolean): number;
1504
+ declare function getSortedIndex<Item>(array: Item[], item: Item, sorter: ArraySorter<Item>, descending?: boolean): number;
1452
1505
  /**
1453
1506
  * Get the index for an item _(to be inserted into an array of items)_ based on an optional default direction_
1454
1507
  *
1455
1508
  * _(If the array is not sorted, it will be treated as sorted, and the result may be inaccurate)_
1509
+ *
1510
+ * Available as `getSortedIndex` and `sort.index`
1456
1511
  * @param array Array to get the index from
1457
1512
  * @param item Item to get the index for
1458
1513
  * @param descending Sorted in descending order? _(defaults to `false`)_
1459
1514
  * @returns Index for item
1460
1515
  */
1461
- declare function getIndex<Item>(array: Item[], item: Item, descending?: boolean): number;
1516
+ declare function getSortedIndex<Item>(array: Item[], item: Item, descending?: boolean): number;
1462
1517
  /**
1463
1518
  * Initialize a sort handler with sorters _(and an optional default direction)_
1519
+ *
1520
+ * Available as `initializeSorter` and `sort.initialize`
1464
1521
  * @param sorters Sorters to use for sorting
1465
1522
  * @param descending Sort in descending order? _(defaults to `false`; overridden by individual sorters)_
1466
1523
  * @returns Sort handler
1467
1524
  */
1468
- declare function initializeSort<Item>(sorters: Array<ArraySorter<Item>>, descending?: boolean): Sorter<Item>;
1525
+ declare function initializeSorter<Item>(sorters: Array<ArraySorter<Item>>, descending?: boolean): Sorter<Item>;
1469
1526
  /**
1470
1527
  * Initialize a sort handler with a sorter _(and an optional default direction)_
1528
+ *
1529
+ * Available as `initializeSorter` and `sort.initialize`
1471
1530
  * @param sorter Sorter to use for sorting
1472
1531
  * @param descending Sort in descending order? _(defaults to `false`; overridden by individual sorters)_
1473
1532
  * @returns Sort handler
1474
1533
  */
1475
- declare function initializeSort<Item>(sorter: ArraySorter<Item>, descending?: boolean): Sorter<Item>;
1534
+ declare function initializeSorter<Item>(sorter: ArraySorter<Item>, descending?: boolean): Sorter<Item>;
1476
1535
  /**
1477
1536
  * Initialize a sort handler _(with an optional default direction)_
1537
+ *
1538
+ * Available as `initializeSorter` and `sort.initialize`
1478
1539
  * @param descending Sort in descending order? _(defaults to `false`)_
1479
1540
  * @returns Sort handler
1480
1541
  */
1481
- declare function initializeSort<Item>(descending?: boolean): Sorter<Item>;
1542
+ declare function initializeSorter<Item>(descending?: boolean): Sorter<Item>;
1482
1543
  /**
1483
1544
  * Is the array sorted according to the sorters _(and the optional default direction)_?
1484
1545
  * @param array Array to check
@@ -1497,6 +1558,8 @@ declare function isSorted<Item>(array: Item[], sorters: Array<ArraySorter<Item>>
1497
1558
  declare function isSorted<Item>(array: Item[], sorter: ArraySorter<Item>, descending?: boolean): boolean;
1498
1559
  /**
1499
1560
  * Is the array sorted?
1561
+ *
1562
+ * Available as `isSorted` and `sort.is`
1500
1563
  * @param array Array to check
1501
1564
  * @param descending Sorted in descending order? _(defaults to `false`)_
1502
1565
  * @returns `true` if sorted, otherwise `false`
@@ -1526,8 +1589,8 @@ declare function sort<Item>(array: Item[], sorter: ArraySorter<Item>, descending
1526
1589
  */
1527
1590
  declare function sort<Item>(array: Item[], descending?: boolean): Item[];
1528
1591
  declare namespace sort {
1529
- var index: typeof getIndex;
1530
- var initialize: typeof initializeSort;
1592
+ var index: typeof getSortedIndex;
1593
+ var initialize: typeof initializeSorter;
1531
1594
  var is: typeof isSorted;
1532
1595
  }
1533
1596
  declare const SORT_DIRECTION_ASCENDING: SortDirection;
@@ -1603,6 +1666,8 @@ declare namespace swap {
1603
1666
  * Swap two indiced items in an array
1604
1667
  *
1605
1668
  * If either index is out of bounds, the array will be returned unchanged
1669
+ *
1670
+ * Available as `swapIndices` and `swap.indices`
1606
1671
  * @param array Array of items to swap
1607
1672
  * @param first First index _(can be negative to count from the end)_
1608
1673
  * @param second Second index _(can be negative to count from the end)_
@@ -1680,6 +1745,8 @@ declare namespace toMap {
1680
1745
  }
1681
1746
  /**
1682
1747
  * Create a Map from an array of items using callbacks, grouping values into arrays
1748
+ *
1749
+ * Available as `toMapArrays` and `toMap.arrays`
1683
1750
  * @param array Array to convert
1684
1751
  * @param key Callback to get an item's grouping key
1685
1752
  * @param value Callback to get an item's value
@@ -1688,6 +1755,8 @@ declare namespace toMap {
1688
1755
  declare function toMapArrays<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Map<ReturnType<KeyCallback>, ReturnType<ValueCallback>[]>;
1689
1756
  /**
1690
1757
  * Create a Map from an array of items using a callback and value, grouping values into arrays
1758
+ *
1759
+ * Available as `toMapArrays` and `toMap.arrays`
1691
1760
  * @param array Array to convert
1692
1761
  * @param key Callback to get an item's grouping key
1693
1762
  * @param value Key to use for value
@@ -1696,6 +1765,8 @@ declare function toMapArrays<Item, KeyCallback extends (item: Item, index: numbe
1696
1765
  declare function toMapArrays<Item extends PlainObject, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ItemValue extends keyof Item>(array: Item[], key: KeyCallback, value: ItemValue): Map<ReturnType<KeyCallback>, Item[ItemValue][]>;
1697
1766
  /**
1698
1767
  * Create a Map from an array of items using a key and callback, grouping values into arrays
1768
+ *
1769
+ * Available as `toMapArrays` and `toMap.arrays`
1699
1770
  * @param array Array to convert
1700
1771
  * @param key Key to use for grouping
1701
1772
  * @param value Callback to get an item's value
@@ -1704,6 +1775,8 @@ declare function toMapArrays<Item extends PlainObject, KeyCallback extends (item
1704
1775
  declare function toMapArrays<Item extends PlainObject, ItemKey extends keyof Item, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: ItemKey, value: ValueCallback): Map<Item[ItemKey], ReturnType<ValueCallback>[]>;
1705
1776
  /**
1706
1777
  * Create a Map from an array of items using a key and value, grouping values into arrays
1778
+ *
1779
+ * Available as `toMapArrays` and `toMap.arrays`
1707
1780
  * @param array Array to convert
1708
1781
  * @param key Key to use for grouping
1709
1782
  * @param value Key to use for value
@@ -1712,6 +1785,8 @@ declare function toMapArrays<Item extends PlainObject, ItemKey extends keyof Ite
1712
1785
  declare function toMapArrays<Item extends PlainObject, ItemKey extends keyof Item, ItemValue extends keyof Item>(array: Item[], key: ItemKey, value: ItemValue): Map<Item[ItemKey], Item[ItemValue][]>;
1713
1786
  /**
1714
1787
  * Create a Map from an array of items using a callback, grouping items into arrays
1788
+ *
1789
+ * Available as `toMapArrays` and `toMap.arrays`
1715
1790
  * @param array Array to convert
1716
1791
  * @param callback Callback to get an item's grouping key
1717
1792
  * @returns Map of keyed arrays of items
@@ -1719,6 +1794,8 @@ declare function toMapArrays<Item extends PlainObject, ItemKey extends keyof Ite
1719
1794
  declare function toMapArrays<Item, Callback extends (item: Item, index: number, array: Item[]) => Key>(array: Item[], callback: Callback): Map<ReturnType<Callback>, Item[]>;
1720
1795
  /**
1721
1796
  * Create a Map from an array of items using a key, grouping items into arrays
1797
+ *
1798
+ * Available as `toMapArrays` and `toMap.arrays`
1722
1799
  * @param array Array to convert
1723
1800
  * @param key Key to use for grouping
1724
1801
  * @returns Map of keyed arrays of items
@@ -1795,6 +1872,8 @@ declare namespace toRecord {
1795
1872
  }
1796
1873
  /**
1797
1874
  * Create a record from an array of items using callbacks, grouping values into arrays
1875
+ *
1876
+ * Available as `toRecordArrays` and `toRecord.arrays`
1798
1877
  * @param array Array to convert
1799
1878
  * @param key Callback to get an item's grouping key
1800
1879
  * @param value Callback to get an item's value
@@ -1803,6 +1882,8 @@ declare namespace toRecord {
1803
1882
  declare function toRecordArrays<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Record<ReturnType<KeyCallback>, ReturnType<ValueCallback>[]>;
1804
1883
  /**
1805
1884
  * Create a record from an array of items using a callback and value, grouping values into arrays
1885
+ *
1886
+ * Available as `toRecordArrays` and `toRecord.arrays`
1806
1887
  * @param array Array to convert
1807
1888
  * @param callback Callback to get an item's grouping key
1808
1889
  * @param value Key to use for value
@@ -1811,6 +1892,8 @@ declare function toRecordArrays<Item, KeyCallback extends (item: Item, index: nu
1811
1892
  declare function toRecordArrays<Item extends PlainObject, Callback extends (item: Item, index: number, array: Item[]) => Key, ItemValue extends keyof Item>(array: Item[], callback: Callback, value: ItemValue): Record<ReturnType<Callback>, Item[ItemValue][]>;
1812
1893
  /**
1813
1894
  * Create a record from an array of items using a key and callback, grouping values into arrays
1895
+ *
1896
+ * Available as `toRecordArrays` and `toRecord.arrays`
1814
1897
  * @param array Array to convert
1815
1898
  * @param key Key to use for grouping
1816
1899
  * @param callback Callback to get an item's value
@@ -1819,6 +1902,8 @@ declare function toRecordArrays<Item extends PlainObject, Callback extends (item
1819
1902
  declare function toRecordArrays<Item extends PlainObject, ItemKey extends keyof Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: ItemKey, callback: Callback): Simplify<Record<KeyedValue<Item, ItemKey>, ReturnType<Callback>[]>>;
1820
1903
  /**
1821
1904
  * Create a record from an array of items using a key and value, grouping values into arrays
1905
+ *
1906
+ * Available as `toRecordArrays` and `toRecord.arrays`
1822
1907
  * @param array Array to convert
1823
1908
  * @param key Key to use for grouping
1824
1909
  * @param value Key to use for value
@@ -1827,6 +1912,8 @@ declare function toRecordArrays<Item extends PlainObject, ItemKey extends keyof
1827
1912
  declare function toRecordArrays<Item extends PlainObject, ItemKey extends keyof Item, ItemValue extends keyof Item>(array: Item[], key: ItemKey, value: ItemValue): Simplify<Record<KeyedValue<Item, ItemKey>, Item[ItemValue][]>>;
1828
1913
  /**
1829
1914
  * Create a record from an array of items using a callback, grouping items into arrays
1915
+ *
1916
+ * Available as `toRecordArrays` and `toRecord.arrays`
1830
1917
  * @param array Array to convert
1831
1918
  * @param callback Callback to get an item's grouping key
1832
1919
  * @returns Record of keyed arrays of items
@@ -1834,6 +1921,8 @@ declare function toRecordArrays<Item extends PlainObject, ItemKey extends keyof
1834
1921
  declare function toRecordArrays<Item, Callback extends (item: Item, index: number, array: Item[]) => Key>(array: Item[], callback: Callback): Record<ReturnType<Callback>, Item[]>;
1835
1922
  /**
1836
1923
  * Create a record from an array of items using a key, grouping items into arrays
1924
+ *
1925
+ * Available as `toRecordArrays` and `toRecord.arrays`
1837
1926
  * @param array Array to convert
1838
1927
  * @param key Key to use for grouping
1839
1928
  * @returns Record of keyed arrays of items
@@ -1857,6 +1946,8 @@ declare namespace assert {
1857
1946
  }
1858
1947
  /**
1859
1948
  * Creates an asserter that asserts a condition is true, throwing an error if it is not
1949
+ *
1950
+ * Available as `assertCondition` and `assert.condition`
1860
1951
  * @param condition Condition to assert
1861
1952
  * @param message Error message
1862
1953
  * @param error Error constructor
@@ -1865,12 +1956,16 @@ declare namespace assert {
1865
1956
  declare function assertCondition<Value>(condition: (value: unknown) => boolean, message: string, error?: ErrorConstructor): Asserter<Value>;
1866
1957
  /**
1867
1958
  * Asserts that a value is defined throwing an error if it is not
1959
+ *
1960
+ * Available as `assertDefined` and `assert.defined`
1868
1961
  * @param value Value to assert
1869
1962
  * @param message Error message
1870
1963
  */
1871
1964
  declare function assertDefined<Value>(value: unknown, message?: string): asserts value is Exclude<Value, null | undefined>;
1872
1965
  /**
1873
1966
  * Creates an asserter that asserts a value is an instance of a constructor, throwing an error if it is not
1967
+ *
1968
+ * Available as `assertInstanceOf` and `assert.instanceOf`
1874
1969
  * @param constructor Constructor to check against
1875
1970
  * @param message Error message
1876
1971
  * @param error Error constructor
@@ -1879,6 +1974,8 @@ declare function assertDefined<Value>(value: unknown, message?: string): asserts
1879
1974
  declare function assertInstanceOf<Value>(constructor: Constructor<Value>, message: string, error?: ErrorConstructor): Asserter<Value>;
1880
1975
  /**
1881
1976
  * Creates an asserter that asserts a value is of a specific type, throwing an error if it is not
1977
+ *
1978
+ * Available as `assertIs` and `assert.is`
1882
1979
  * @param condition Type guard function to check the value
1883
1980
  * @param message Error message
1884
1981
  * @param error Error constructor
@@ -1969,6 +2066,8 @@ declare function memoize<Callback extends GenericCallback>(callback: Callback, o
1969
2066
  * When called, successful _(finished)_ results will resolve and errors will reject.
1970
2067
  *
1971
2068
  * On subsequent calls, existing calls will be canceled _(rejected)_, the timer reset, and will wait another `time` milliseconds before the new call is made _(and so on...)_
2069
+ *
2070
+ * Available as `asyncDebounce` and `debounce.async`
1972
2071
  * @param callback Callback to debounce
1973
2072
  * @param time Time in milliseconds to wait before calling the callback _(defaults to `0`; e.g., as soon as possible)_
1974
2073
  * @returns Debounced callback handler with a `cancel` method
@@ -1980,6 +2079,8 @@ declare function asyncDebounce<Callback extends GenericAsyncCallback | GenericCa
1980
2079
  * When called, successful _(finished)_ results will resolve and errors will reject.
1981
2080
  *
1982
2081
  * On subsequent calls, existing calls will be canceled _(rejected)_ and will wait until the next valid time to call the callback again _(and so on...)_
2082
+ *
2083
+ * Available as `asyncThrottle` and `throttle.async`
1983
2084
  * @param callback Callback to throttle
1984
2085
  * @param time Time in milliseconds to wait before calling the callback again _(defaults to `0`; e.g., as soon as possible)_
1985
2086
  * @returns Throttled callback handler with a `cancel` method
@@ -2011,6 +2112,8 @@ declare namespace throttle {
2011
2112
  //#region src/function/once.d.ts
2012
2113
  /**
2013
2114
  * Create an asynchronous function that can only be called once, rejecting or resolving the same result on subsequent calls
2115
+ *
2116
+ * Available as `asyncOnce` and `once.async`
2014
2117
  * @param callback Callback to use once
2015
2118
  * @returns Once callback
2016
2119
  */
@@ -2037,6 +2140,8 @@ type RetryOptions = {
2037
2140
  };
2038
2141
  /**
2039
2142
  * Retry a callback a specified number of times, with a delay between attempts
2143
+ *
2144
+ * Available as `asyncRetry` and `retry.async`
2040
2145
  * @param callback Callback to retry
2041
2146
  * @param options Retry options
2042
2147
  * @returns Callback result
@@ -2044,6 +2149,8 @@ type RetryOptions = {
2044
2149
  declare function asyncRetry<Callback extends GenericAsyncCallback>(callback: Callback, options?: RetryOptions): Promise<Awaited<ReturnType<Callback>>>;
2045
2150
  /**
2046
2151
  * Retry a callback a specified number of times, with a delay between attempts
2152
+ *
2153
+ * Available as `asyncRetry` and `retry.async`
2047
2154
  * @param callback Callback to retry
2048
2155
  * @param options Retry options
2049
2156
  * @returns Callback result
@@ -2131,61 +2238,85 @@ type Flow<Callback extends GenericCallback, Value> = (...args: Parameters<Callba
2131
2238
  type FlowPromise<Callback extends GenericCallback, Value> = (...args: Parameters<Callback>) => Promise<UnwrapValue<Value>>;
2132
2239
  /**
2133
2240
  * Create an asynchronous Flow, a function that pipes values through a function
2241
+ *
2242
+ * Available as `asyncFlow` and `flow.async`
2134
2243
  * @returns Flow function
2135
2244
  */
2136
2245
  declare function asyncFlow<Fn extends GenericCallback>(fn: Fn): FlowPromise<Fn, ReturnType<Fn>>;
2137
2246
  /**
2138
2247
  * Create an asynchronous Flow, a function that pipes values through a series of functions
2248
+ *
2249
+ * Available as `asyncFlow` and `flow.async`
2139
2250
  * @returns Flow function
2140
2251
  */
2141
2252
  declare function asyncFlow<First extends GenericCallback, Second>(first: First, second: (value: Awaited<UnwrapValue<ReturnType<First>>>) => Second): FlowPromise<First, Second>;
2142
2253
  /**
2143
2254
  * Create an asynchronous Flow, a function that pipes values through a series of functions
2255
+ *
2256
+ * Available as `asyncFlow` and `flow.async`
2144
2257
  * @returns Flow function
2145
2258
  */
2146
2259
  declare function asyncFlow<First extends GenericCallback, Second, Third>(first: First, second: (value: Awaited<UnwrapValue<ReturnType<First>>>) => Second, third: (value: Awaited<UnwrapValue<Second>>) => Third): FlowPromise<First, Third>;
2147
2260
  /**
2148
2261
  * Create an asynchronous Flow, a function that pipes values through a series of functions
2262
+ *
2263
+ * Available as `asyncFlow` and `flow.async`
2149
2264
  * @returns Flow function
2150
2265
  */
2151
2266
  declare function asyncFlow<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): FlowPromise<First, Fourth>;
2152
2267
  /**
2153
2268
  * Create an asynchronous Flow, a function that pipes values through a series of functions
2269
+ *
2270
+ * Available as `asyncFlow` and `flow.async`
2154
2271
  * @returns Flow function
2155
2272
  */
2156
2273
  declare function asyncFlow<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): FlowPromise<First, Fifth>;
2157
2274
  /**
2158
2275
  * Create an asynchronous Flow, a function that pipes values through a series of functions
2276
+ *
2277
+ * Available as `asyncFlow` and `flow.async`
2159
2278
  * @returns Flow function
2160
2279
  */
2161
2280
  declare function asyncFlow<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): FlowPromise<First, Sixth>;
2162
2281
  /**
2163
2282
  * Create an asynchronous Flow, a function that pipes values through a series of functions
2283
+ *
2284
+ * Available as `asyncFlow` and `flow.async`
2164
2285
  * @returns Flow function
2165
2286
  */
2166
2287
  declare function asyncFlow<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): FlowPromise<First, Seventh>;
2167
2288
  /**
2168
2289
  * Create an asynchronous Flow, a function that pipes values through a series of functions
2290
+ *
2291
+ * Available as `asyncFlow` and `flow.async`
2169
2292
  * @returns Flow function
2170
2293
  */
2171
2294
  declare function asyncFlow<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): FlowPromise<First, Eighth>;
2172
2295
  /**
2173
2296
  * Create an asynchronous Flow, a function that pipes values through a series of functions
2297
+ *
2298
+ * Available as `asyncFlow` and `flow.async`
2174
2299
  * @returns Flow function
2175
2300
  */
2176
2301
  declare function asyncFlow<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): FlowPromise<First, Ninth>;
2177
2302
  /**
2178
2303
  * Create an asynchronous Flow, a function that pipes values through a series of functions
2304
+ *
2305
+ * Available as `asyncFlow` and `flow.async`
2179
2306
  * @returns Flow function
2180
2307
  */
2181
2308
  declare function asyncFlow<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): FlowPromise<First, Tenth>;
2182
2309
  /**
2183
2310
  * Create an asynchronous Flow, a function that pipes values through a series of functions
2311
+ *
2312
+ * Available as `asyncFlow` and `flow.async`
2184
2313
  * @returns Flow function
2185
2314
  */
2186
2315
  declare function asyncFlow<Fn extends GenericCallback>(fn: Fn, ...fns: Array<(value: Awaited<UnwrapValue<ReturnType<Fn>>>) => unknown>): FlowPromise<Fn, ReturnType<Fn>>;
2187
2316
  /**
2188
2317
  * Create an asynchronous Flow, a function that pipes values through a series of functions
2318
+ *
2319
+ * Available as `asyncFlow` and `flow.async`
2189
2320
  * @returns Flow function
2190
2321
  */
2191
2322
  declare function asyncFlow(...fns: GenericCallback[]): (...args: unknown[]) => Promise<unknown>;
@@ -2254,72 +2385,96 @@ declare namespace flow {
2254
2385
  }
2255
2386
  /**
2256
2387
  * Pipe a value through a function
2388
+ *
2389
+ * Available as `asyncPipe` and `pipe.async`
2257
2390
  * @param value Initial value
2258
2391
  * @returns Piped result
2259
2392
  */
2260
2393
  declare function asyncPipe<Initial, Piped>(value: Initial, pipe: (value: UnwrapValue<Initial>) => Piped): Promise<UnwrapValue<Piped>>;
2261
2394
  /**
2262
2395
  * Pipe a value through a series of functions
2396
+ *
2397
+ * Available as `asyncPipe` and `pipe.async`
2263
2398
  * @param value Initial value
2264
2399
  * @returns Piped result
2265
2400
  */
2266
2401
  declare function asyncPipe<Initial, First, Second>(value: Initial, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second): Promise<UnwrapValue<Second>>;
2267
2402
  /**
2268
2403
  * Pipe a value through a series of functions
2404
+ *
2405
+ * Available as `asyncPipe` and `pipe.async`
2269
2406
  * @param value Initial value
2270
2407
  * @returns Piped result
2271
2408
  */
2272
2409
  declare function asyncPipe<Initial, First, Second, Third>(value: Initial, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third): Promise<UnwrapValue<Third>>;
2273
2410
  /**
2274
2411
  * Pipe a value through a series of functions
2412
+ *
2413
+ * Available as `asyncPipe` and `pipe.async`
2275
2414
  * @param value Initial value
2276
2415
  * @returns Piped result
2277
2416
  */
2278
2417
  declare function asyncPipe<Initial, First, Second, Third, Fourth>(value: Initial, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth): Promise<UnwrapValue<Fourth>>;
2279
2418
  /**
2280
2419
  * Pipe a value through a series of functions
2420
+ *
2421
+ * Available as `asyncPipe` and `pipe.async`
2281
2422
  * @param value Initial value
2282
2423
  * @returns Piped result
2283
2424
  */
2284
2425
  declare function asyncPipe<Initial, First, Second, Third, Fourth, Fifth>(value: 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): Promise<UnwrapValue<Fifth>>;
2285
2426
  /**
2286
2427
  * Pipe a value through a series of functions
2428
+ *
2429
+ * Available as `asyncPipe` and `pipe.async`
2287
2430
  * @param value Initial value
2288
2431
  * @returns Piped result
2289
2432
  */
2290
2433
  declare function asyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth>(value: 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): Promise<UnwrapValue<Sixth>>;
2291
2434
  /**
2292
2435
  * Pipe a value through a series of functions
2436
+ *
2437
+ * Available as `asyncPipe` and `pipe.async`
2293
2438
  * @param value Initial value
2294
2439
  * @returns Piped result
2295
2440
  */
2296
2441
  declare function asyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh>(value: 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): Promise<UnwrapValue<Seventh>>;
2297
2442
  /**
2298
2443
  * Pipe a value through a series of functions
2444
+ *
2445
+ * Available as `asyncPipe` and `pipe.async`
2299
2446
  * @param value Initial value
2300
2447
  * @returns Piped result
2301
2448
  */
2302
2449
  declare function asyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(value: 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): Promise<UnwrapValue<Eighth>>;
2303
2450
  /**
2304
2451
  * Pipe a value through a series of functions
2452
+ *
2453
+ * Available as `asyncPipe` and `pipe.async`
2305
2454
  * @param value Initial value
2306
2455
  * @returns Piped result
2307
2456
  */
2308
2457
  declare function asyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth>(value: 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): Promise<UnwrapValue<Ninth>>;
2309
2458
  /**
2310
2459
  * Pipe a value through a series of functions
2460
+ *
2461
+ * Available as `asyncPipe` and `pipe.async`
2311
2462
  * @param value Initial value
2312
2463
  * @returns Piped result
2313
2464
  */
2314
2465
  declare function asyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth>(value: 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): Promise<UnwrapValue<Tenth>>;
2315
2466
  /**
2316
2467
  * Pipe a value through a series of functions
2468
+ *
2469
+ * Available as `asyncPipe` and `pipe.async`
2317
2470
  * @param value Initial value
2318
2471
  * @returns Piped result
2319
2472
  */
2320
2473
  declare function asyncPipe<Value>(value: Value, ...pipes: Array<(value: Value) => Value>): Promise<UnwrapValue<Value>>;
2321
2474
  /**
2322
2475
  * Pipe a value through a series of functions
2476
+ *
2477
+ * Available as `asyncPipe` and `pipe.async`
2323
2478
  * @param value Initial value
2324
2479
  * @returns Piped result
2325
2480
  */
@@ -2434,24 +2589,28 @@ declare function words(value: string): string[];
2434
2589
  declare function compare(first: unknown, second: unknown): number;
2435
2590
  declare namespace compare {
2436
2591
  var handlers: {
2437
- register: (constructor: Constructor, handler?: string | GenericCallback) => void;
2438
- unregister: (constructor: Constructor) => void;
2592
+ deregister(constructor: Constructor): void;
2439
2593
  handle(first: unknown, second: unknown, ...parameters: unknown[]): number;
2594
+ register(constructor: Constructor, handler?: string | GenericCallback): void;
2440
2595
  };
2596
+ var deregister: typeof deregisterComparator;
2441
2597
  var register: typeof registerComparator;
2442
- var unregister: typeof unregisterComparator;
2443
2598
  }
2444
2599
  /**
2445
- * Register a custom comparison handler for a class
2600
+ * Deregister a custom comparison handler for a class
2601
+ *
2602
+ * Available as `deregisterComparator` and `compare.deregister`
2446
2603
  * @param constructor Class constructor
2447
- * @param handler Method name or comparison function _(defaults to `compare`)_
2448
2604
  */
2449
- declare function registerComparator<Instance>(constructor: Constructor<Instance>, handler?: string | ((first: Instance, second: Instance) => number)): void;
2605
+ declare function deregisterComparator<Instance>(constructor: Constructor<Instance>): void;
2450
2606
  /**
2451
- * Unregister a custom comparison handler for a class
2607
+ * Register a custom comparison handler for a class
2608
+ *
2609
+ * Available as `registerComparator` and `compare.register`
2452
2610
  * @param constructor Class constructor
2611
+ * @param handler Method name or comparison function _(defaults to `compare`)_
2453
2612
  */
2454
- declare function unregisterComparator<Instance>(constructor: Constructor<Instance>): void;
2613
+ declare function registerComparator<Instance>(constructor: Constructor<Instance>, handler?: string | ((first: Instance, second: Instance) => number)): void;
2455
2614
  //#endregion
2456
2615
  //#region src/internal/value/equal.d.ts
2457
2616
  /**
@@ -2472,6 +2631,14 @@ type EqualOptions = {
2472
2631
  relaxedNullish?: boolean;
2473
2632
  };
2474
2633
  type Equalizer = {
2634
+ /**
2635
+ * Are two strings equal?
2636
+ * @param first First string
2637
+ * @param second Second string
2638
+ * @param ignoreCase If `true`, comparison will be case-insensitive
2639
+ * @returns `true` if the strings are equal, otherwise `false`
2640
+ */
2641
+ (first: string, second: string, ignoreCase?: boolean): boolean;
2475
2642
  /**
2476
2643
  * Are two values equal?
2477
2644
  * @param first First value
@@ -2480,17 +2647,24 @@ type Equalizer = {
2480
2647
  */
2481
2648
  (first: unknown, second: unknown): boolean;
2482
2649
  /**
2483
- * Register a equality comparison function for a specific class
2650
+ * Deregister a equality comparison handler for a specific class
2484
2651
  * @param constructor Class constructor
2485
- * @param fn Comparison function
2486
2652
  */
2487
- register: <Instance>(constructor: Constructor<Instance>, handler: (first: Instance, second: Instance) => boolean) => void;
2653
+ deregister: <Instance>(constructor: Constructor<Instance>) => void;
2488
2654
  /**
2489
- * Unregister a equality comparison handler for a specific class
2655
+ * Register a equality comparison function for a specific class
2490
2656
  * @param constructor Class constructor
2657
+ * @param handler Comparison function
2491
2658
  */
2492
- unregister: <Instance>(constructor: Constructor<Instance>) => void;
2659
+ register: <Instance>(constructor: Constructor<Instance>, handler: (first: Instance, second: Instance) => boolean) => void;
2493
2660
  };
2661
+ /**
2662
+ * Deregister a equality comparison handler for a specific class
2663
+ *
2664
+ * Available as `deregisterEqualizer` and `equal.deregister`
2665
+ * @param constructor Class constructor
2666
+ */
2667
+ declare function deregisterEqualizer<Instance>(constructor: Constructor<Instance>): void;
2494
2668
  /**
2495
2669
  * Are two strings equal?
2496
2670
  * @param first First string
@@ -2509,31 +2683,30 @@ declare function equal(first: string, second: string, ignoreCase?: boolean): boo
2509
2683
  declare function equal(first: unknown, second: unknown, options?: EqualOptions): boolean;
2510
2684
  declare namespace equal {
2511
2685
  var handlers: {
2512
- register: (constructor: Constructor, handler?: string | GenericCallback) => void;
2513
- unregister: (constructor: Constructor) => void;
2686
+ deregister(constructor: Constructor): void;
2514
2687
  handle(first: unknown, second: unknown, ...parameters: unknown[]): boolean;
2688
+ register(constructor: Constructor, handler?: string | GenericCallback): void;
2515
2689
  };
2690
+ var deregister: typeof deregisterEqualizer;
2516
2691
  var initialize: typeof initializeEqualizer;
2517
2692
  var register: typeof registerEqualizer;
2518
- var unregister: typeof unregisterEqualizer;
2519
2693
  }
2520
2694
  /**
2521
2695
  * Create an equalizer with predefined options
2696
+ *
2697
+ * Available as `initializeEqualizer` and `equal.initialize`
2522
2698
  * @param options Comparison options
2523
2699
  * @returns Equalizer function
2524
2700
  */
2525
2701
  declare function initializeEqualizer(options?: EqualOptions): Equalizer;
2526
2702
  /**
2527
2703
  * Register a equality comparison function for a specific class
2704
+ *
2705
+ * Available as `registerEqualizer` and `equal.register`
2528
2706
  * @param constructor Class constructor
2529
- * @param fn Comparison function
2707
+ * @param handler Comparison function
2530
2708
  */
2531
2709
  declare function registerEqualizer<Instance>(constructor: Constructor<Instance>, handler: (first: Instance, second: Instance) => boolean): void;
2532
- /**
2533
- * Unregister a equality comparison handler for a specific class
2534
- * @param constructor Class constructor
2535
- */
2536
- declare function unregisterEqualizer<Instance>(constructor: Constructor<Instance>): void;
2537
2710
  //#endregion
2538
2711
  //#region src/internal/value/get.d.ts
2539
2712
  /**
@@ -2553,10 +2726,6 @@ declare function getValue<Data extends PlainObject, Path extends NestedKeys<Data
2553
2726
  declare function getValue<Data extends PlainObject>(data: Data, path: string, ignoreCase?: boolean): unknown;
2554
2727
  //#endregion
2555
2728
  //#region src/internal/value/has.d.ts
2556
- type HasValue<Value> = {
2557
- exists: boolean;
2558
- value: Value;
2559
- };
2560
2729
  /**
2561
2730
  * Check if a nested property is defined in an object
2562
2731
  * @param data Object to check in
@@ -2573,24 +2742,28 @@ declare function hasValue<Data extends PlainObject, Path extends NestedKeys<Data
2573
2742
  */
2574
2743
  declare function hasValue<Data extends PlainObject>(data: Data, path: string, ignoreCase?: boolean): boolean;
2575
2744
  declare namespace hasValue {
2576
- var get: typeof getWithHasValue;
2745
+ var get: typeof hasValueResult;
2577
2746
  }
2578
2747
  /**
2579
2748
  * Check if a nested property is defined in an object, and get its value if it is
2749
+ *
2750
+ * Available as `hasValueResult` and `hasValue.get`
2580
2751
  * @param data Object to check in
2581
2752
  * @param path Path for property
2582
2753
  * @param ignoreCase If `true`, the path matching is case-insensitive
2583
2754
  * @return Result object
2584
2755
  */
2585
- declare function getWithHasValue<Data extends PlainObject, Path extends NestedKeys<Data>>(data: Data, path: Path, ignoreCase?: boolean): HasValue<NestedValue<Data, ToString<Path>>>;
2756
+ declare function hasValueResult<Data extends PlainObject, Path extends NestedKeys<Data>>(data: Data, path: Path, ignoreCase?: boolean): Result<NestedValue<Data, ToString<Path>>, undefined>;
2586
2757
  /**
2587
2758
  * Check if a nested property is defined in an object, and get its value if it is
2759
+ *
2760
+ * Available as `hasValueResult` and `hasValue.get`
2588
2761
  * @param data Object to check in
2589
2762
  * @param path Path for property
2590
2763
  * @param ignoreCase If `true`, the path matching is case-insensitive
2591
2764
  * @return Result object
2592
2765
  */
2593
- declare function getWithHasValue<Data extends PlainObject>(data: Data, path: string, ignoreCase?: boolean): HasValue<unknown>;
2766
+ declare function hasValueResult<Data extends PlainObject>(data: Data, path: string, ignoreCase?: boolean): Result<unknown, undefined>;
2594
2767
  //#endregion
2595
2768
  //#region src/internal/value/set.d.ts
2596
2769
  /**
@@ -2775,6 +2948,16 @@ declare function fuzzy<Item>(items: Item[], handler?: (item: Item) => string): F
2775
2948
  * @returns Fuzzy searcher
2776
2949
  */
2777
2950
  declare function fuzzy<Item>(items: Item[], configuration?: FuzzyConfiguration<Item>): Fuzzy<Item>;
2951
+ declare namespace fuzzy {
2952
+ var match: typeof fuzzyMatch;
2953
+ }
2954
+ /**
2955
+ * Does the needle match the haystack in a fuzzy way?
2956
+ * @param haystack Haystack to search through
2957
+ * @param needle Needle to search for
2958
+ * @returns `true` if the needle matches the haystack in a fuzzy way, `false` otherwise
2959
+ */
2960
+ declare function fuzzyMatch(haystack: string, needle: string): boolean;
2778
2961
  //#endregion
2779
2962
  //#region src/string/index.d.ts
2780
2963
  declare function dedent(strings: TemplateStringsArray, ...values: unknown[]): string;
@@ -2855,6 +3038,8 @@ type TemplateOptions = {
2855
3038
  type Templater = (value: string, variables?: PlainObject) => string;
2856
3039
  /**
2857
3040
  * Create a templater with predefined options
3041
+ *
3042
+ * Available as `initializeTemplater` and `template.initialize`
2858
3043
  * @param options Templating options
2859
3044
  * @returns Templater function
2860
3045
  */
@@ -2880,24 +3065,28 @@ declare namespace template {
2880
3065
  declare function clone<Value>(value: Value): Value;
2881
3066
  declare namespace clone {
2882
3067
  var handlers: {
2883
- register: (constructor: Constructor, handler?: string | GenericCallback) => void;
2884
- unregister: (constructor: Constructor) => void;
3068
+ deregister(constructor: Constructor): void;
2885
3069
  handle(value: unknown, ...parameters: unknown[]): any;
3070
+ register(constructor: Constructor, handler?: string | GenericCallback): void;
2886
3071
  };
3072
+ var deregister: typeof deregisterCloner;
2887
3073
  var register: typeof registerCloner;
2888
- var unregister: typeof unregisterCloner;
2889
3074
  }
2890
3075
  /**
2891
- * Register a clone handler for a specific class
3076
+ * Deregister a clone handler for a specific class
3077
+ *
3078
+ * Available as `deregisterCloner` and `template.deregister`
2892
3079
  * @param constructor Class constructor
2893
- * @param handler Method name or clone function _(defaults to `clone`)_
2894
3080
  */
2895
- declare function registerCloner<Instance>(constructor: Constructor<Instance>, handler?: string | ((value: Instance) => Instance)): void;
3081
+ declare function deregisterCloner<Instance>(constructor: Constructor<Instance>): void;
2896
3082
  /**
2897
- * Unregister a clone handler for a specific class
3083
+ * Register a clone handler for a specific class
3084
+ *
3085
+ * Available as `registerCloner` and `template.register`
2898
3086
  * @param constructor Class constructor
3087
+ * @param handler Method name or clone function _(defaults to `clone`)_
2899
3088
  */
2900
- declare function unregisterCloner<Instance>(constructor: Constructor<Instance>): void;
3089
+ declare function registerCloner<Instance>(constructor: Constructor<Instance>, handler?: string | ((value: Instance) => Instance)): void;
2901
3090
  //#endregion
2902
3091
  //#region src/value/collection.d.ts
2903
3092
  /**
@@ -3046,6 +3235,14 @@ type MergeOptions = {
3046
3235
  * @returns Merged value
3047
3236
  */
3048
3237
  type Merger<Model extends ArrayOrPlainObject = ArrayOrPlainObject> = (values: NestedPartial<Model>[]) => Model;
3238
+ /**
3239
+ * Create a merger with predefined options
3240
+ *
3241
+ * Available as `initializeMerger` and `merge.initialize`
3242
+ * @param options Merging options
3243
+ * @returns Merger function
3244
+ */
3245
+ declare function initializeMerger(options?: MergeOptions): Merger;
3049
3246
  /**
3050
3247
  * Merge multiple arrays or objects into a single one
3051
3248
  * @param values Values to merge
@@ -3063,12 +3260,6 @@ declare function merge(values: NestedPartial<ArrayOrPlainObject>[], options?: Me
3063
3260
  declare namespace merge {
3064
3261
  var initialize: typeof initializeMerger;
3065
3262
  }
3066
- /**
3067
- * Create a merger with predefined options
3068
- * @param options Merging options
3069
- * @returns Merger function
3070
- */
3071
- declare function initializeMerger(options?: MergeOptions): Merger;
3072
3263
  //#endregion
3073
3264
  //#region src/beacon.d.ts
3074
3265
  declare class Beacon<Value> {
@@ -3938,6 +4129,8 @@ declare function delay(time?: number): Promise<void>;
3938
4129
  //#region src/promise/index.d.ts
3939
4130
  /**
3940
4131
  * Wrap a promise with safety handlers, with optional abort capabilities and timeout
4132
+ *
4133
+ * Available as `attemptPromise` and `attempt.promise`
3941
4134
  * @param promise Promise to wrap
3942
4135
  * @param options Options for the promise
3943
4136
  * @returns Wrapped promise
@@ -3945,6 +4138,8 @@ declare function delay(time?: number): Promise<void>;
3945
4138
  declare function attemptPromise<Value>(promise: Promise<Value>, options?: PromiseOptions | AbortSignal | number): Promise<Value>;
3946
4139
  /**
3947
4140
  * Wrap a promise-returning callback with safety handlers, with optional abort capabilities and timeout
4141
+ *
4142
+ * Available as `attemptPromise` and `attempt.promise`
3948
4143
  * @param callback Callback to wrap
3949
4144
  * @param options Options for the promise
3950
4145
  * @returns Promise-wrapped callback
@@ -3952,6 +4147,8 @@ declare function attemptPromise<Value>(promise: Promise<Value>, options?: Promis
3952
4147
  declare function attemptPromise<Value>(callback: () => Promise<Value>, options?: PromiseOptions | AbortSignal | number): Promise<Value>;
3953
4148
  /**
3954
4149
  * Wrap a callback with a promise and safety handlers, with optional abort capabilities and timeout
4150
+ *
4151
+ * Available as `attemptPromise` and `attempt.promise`
3955
4152
  * @param callback Callback to wrap
3956
4153
  * @param options Options for the promise
3957
4154
  * @returns Promise-wrapped callback
@@ -4014,6 +4211,8 @@ declare namespace promises {
4014
4211
  * Handle a list of promises, returning their results in an ordered array of results _({@link Result})_.
4015
4212
  *
4016
4213
  * Depending on the strategy, the function will either reject on the first error encountered or return an array of rejected and resolved results
4214
+ *
4215
+ * Available as `resultPromises` and `promises.result`
4017
4216
  * @param items List of promises
4018
4217
  * @param signal AbortSignal for aborting the operation _(when aborted, the promise will reject with the reason of the signal)_
4019
4218
  * @returns List of results
@@ -4023,6 +4222,8 @@ declare function resultPromises<Items extends unknown[]>(items: [...Items], sign
4023
4222
  * Handle a list of promises, returning their results in an ordered array of results _({@link Result})_.
4024
4223
  *
4025
4224
  * Depending on the strategy, the function will either reject on the first error encountered or return an array of rejected and resolved results
4225
+ *
4226
+ * Available as `resultPromises` and `promises.result`
4026
4227
  * @param items List of promises
4027
4228
  * @param signal AbortSignal for aborting the operation _(when aborted, the promise will reject with the reason of the signal)_
4028
4229
  * @returns List of results
@@ -4070,14 +4271,14 @@ declare function isResult(value: unknown): value is ExtendedErr<unknown> | Resul
4070
4271
  //#region src/result/misc.d.ts
4071
4272
  /**
4072
4273
  * Creates an extended error result
4073
- * @param error Error value
4274
+ * @param value Error value
4074
4275
  * @param original Original error
4075
4276
  * @returns Error result
4076
4277
  */
4077
4278
  declare function error<E>(value: E, original: Error): ExtendedErr<E>;
4078
4279
  /**
4079
4280
  * Creates an error result
4080
- * @param error Error value
4281
+ * @param value Error value
4081
4282
  * @returns Error result
4082
4283
  */
4083
4284
  declare function error<E>(value: E): Err<E>;
@@ -4092,7 +4293,7 @@ declare function ok<Value>(value: Value): Ok<Value>;
4092
4293
  * Converts a result to a promise
4093
4294
  *
4094
4295
  * Resolves if ok, rejects for error
4095
- * @param result Result to convert
4296
+ * @param callback Callback to get the result
4096
4297
  * @returns Promised result
4097
4298
  */
4098
4299
  declare function toPromise<Value, E = Error>(callback: () => AnyResult<Value, E>): Promise<Value>;
@@ -4378,12 +4579,16 @@ declare function asyncMatchResult<Value, Returned, E = Error>(result: AnyResult<
4378
4579
  declare function asyncMatchResult<Value, Returned, E = Error>(result: AnyResult<Value, E> | Promise<AnyResult<Value, E>> | (() => Promise<AnyResult<Value, E>>), ok: ResultMatch<Value, Returned, E>['ok'], error: ResultMatch<Value, Returned, E>['error']): Promise<Returned>;
4379
4580
  /**
4380
4581
  * Handles a result with match callbacks
4582
+ *
4583
+ * Available as `matchResult` and `attempt.match`
4381
4584
  * @param result Result to handle
4382
4585
  * @param handler Match callbacks
4383
4586
  */
4384
4587
  declare function matchResult<Value, Returned, E = Error>(result: AnyResult<Value, E> | (() => AnyResult<Value, E>), handler: ResultMatch<Value, Returned, E>): Returned;
4385
4588
  /**
4386
4589
  * Handles a result with match callbacks
4590
+ *
4591
+ * Available as `matchResult` and `attempt.match`
4387
4592
  * @param result Result to handle
4388
4593
  * @param ok Ok callback
4389
4594
  * @param error Error callback
@@ -4404,121 +4609,169 @@ type AttemptFlow<Callback extends GenericCallback, Value> = (...args: Parameters
4404
4609
  type AttemptFlowPromise<Callback extends GenericCallback, Value> = (...args: Parameters<Callback>) => Promise<Result<UnwrapValue<Value>>>;
4405
4610
  /**
4406
4611
  * Create an asynchronous Flow, a function that attempts to pipe a value through a series of functions
4612
+ *
4613
+ * Available as `attemptAsyncFlow` and `attempt.flow.async`
4407
4614
  * @returns Flow function
4408
4615
  */
4409
4616
  declare function attemptAsyncFlow<Fn extends GenericCallback>(fn: Fn): AttemptFlowPromise<Fn, ReturnType<Fn>>;
4410
4617
  /**
4411
4618
  * Create an asynchronous Flow, a function that pipes values through a series of functions
4619
+ *
4620
+ * Available as `attemptAsyncFlow` and `attempt.flow.async`
4412
4621
  * @returns Flow function
4413
4622
  */
4414
4623
  declare function attemptAsyncFlow<First extends GenericCallback, Second>(first: First, second: (value: Awaited<UnwrapValue<ReturnType<First>>>) => Second): AttemptFlowPromise<First, Second>;
4415
4624
  /**
4416
4625
  * Create an asynchronous Flow, a function that pipes values through a series of functions
4626
+ *
4627
+ * Available as `attemptAsyncFlow` and `attempt.flow.async`
4417
4628
  * @returns Flow function
4418
4629
  */
4419
4630
  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>;
4420
4631
  /**
4421
4632
  * Create an asynchronous Flow, a function that pipes values through a series of functions
4633
+ *
4634
+ * Available as `attemptAsyncFlow` and `attempt.flow.async`
4422
4635
  * @returns Flow function
4423
4636
  */
4424
4637
  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>;
4425
4638
  /**
4426
4639
  * Create an asynchronous Flow, a function that pipes values through a series of functions
4640
+ *
4641
+ * Available as `attemptAsyncFlow` and `attempt.flow.async`
4427
4642
  * @returns Flow function
4428
4643
  */
4429
4644
  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>;
4430
4645
  /**
4431
4646
  * Create an asynchronous Flow, a function that pipes values through a series of functions
4647
+ *
4648
+ * Available as `attemptAsyncFlow` and `attempt.flow.async`
4432
4649
  * @returns Flow function
4433
4650
  */
4434
4651
  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>;
4435
4652
  /**
4436
4653
  * Create an asynchronous Flow, a function that pipes values through a series of functions
4654
+ *
4655
+ * Available as `attemptAsyncFlow` and `attempt.flow.async`
4437
4656
  * @returns Flow function
4438
4657
  */
4439
4658
  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>;
4440
4659
  /**
4441
4660
  * Create an asynchronous Flow, a function that pipes values through a series of functions
4661
+ *
4662
+ * Available as `attemptAsyncFlow` and `attempt.flow.async`
4442
4663
  * @returns Flow function
4443
4664
  */
4444
4665
  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>;
4445
4666
  /**
4446
4667
  * Create an asynchronous Flow, a function that pipes values through a series of functions
4668
+ *
4669
+ * Available as `attemptAsyncFlow` and `attempt.flow.async`
4447
4670
  * @returns Flow function
4448
4671
  */
4449
4672
  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>;
4450
4673
  /**
4451
4674
  * Create an asynchronous Flow, a function that pipes values through a series of functions
4675
+ *
4676
+ * Available as `attemptAsyncFlow` and `attempt.flow.async`
4452
4677
  * @returns Flow function
4453
4678
  */
4454
4679
  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>;
4455
4680
  /**
4456
4681
  * Create an asynchronous Flow, a function that pipes values through a series of functions
4682
+ *
4683
+ * Available as `attemptAsyncFlow` and `attempt.flow.async`
4457
4684
  * @returns Flow function
4458
4685
  */
4459
4686
  declare function attemptAsyncFlow<Fn extends GenericCallback>(fn: Fn, ...fns: Array<(value: Awaited<UnwrapValue<ReturnType<Fn>>>) => unknown>): AttemptFlowPromise<Fn, ReturnType<Fn>>;
4460
4687
  /**
4461
4688
  * Create an asynchronous Flow, a function that pipes values through a series of functions
4689
+ *
4690
+ * Available as `attemptAsyncFlow` and `attempt.flow.async`
4462
4691
  * @returns Flow function
4463
4692
  */
4464
4693
  declare function attemptAsyncFlow(...fns: GenericCallback[]): (...args: unknown[]) => Promise<Result<unknown>>;
4465
4694
  /**
4466
4695
  * Create a Flow, a function that attempts to pipe values through a function
4696
+ *
4697
+ * Available as `attemptFlow` and `attempt.flow`
4467
4698
  * @returns Flow function
4468
4699
  */
4469
4700
  declare function attemptFlow<Fn extends GenericCallback>(fn: Fn): AttemptFlow<Fn, ReturnType<Fn>>;
4470
4701
  /**
4471
4702
  * Create a Flow, a function that attempts to pipe values through a series of functions
4703
+ *
4704
+ * Available as `attemptFlow` and `attempt.flow`
4472
4705
  * @returns Flow function
4473
4706
  */
4474
4707
  declare function attemptFlow<First extends GenericCallback, Second>(first: First, second: (value: UnwrapValue<ReturnType<First>>) => Second): AttemptFlow<First, Second>;
4475
4708
  /**
4476
4709
  * Create a Flow, a function that attempts to pipe values through a series of functions
4710
+ *
4711
+ * Available as `attemptFlow` and `attempt.flow`
4477
4712
  * @returns Flow function
4478
4713
  */
4479
4714
  declare function attemptFlow<First extends GenericCallback, Second, Third>(first: First, second: (value: UnwrapValue<ReturnType<First>>) => Second, third: (value: UnwrapValue<Second>) => Third): AttemptFlow<First, Third>;
4480
4715
  /**
4481
4716
  * Create a Flow, a function that attempts to pipe values through a series of functions
4717
+ *
4718
+ * Available as `attemptFlow` and `attempt.flow`
4482
4719
  * @returns Flow function
4483
4720
  */
4484
4721
  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>;
4485
4722
  /**
4486
4723
  * Create a Flow, a function that attempts to pipe values through a series of functions
4724
+ *
4725
+ * Available as `attemptFlow` and `attempt.flow`
4487
4726
  * @returns Flow function
4488
4727
  */
4489
4728
  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>;
4490
4729
  /**
4491
4730
  * Create a Flow, a function that attempts to pipe values through a series of functions
4731
+ *
4732
+ * Available as `attemptFlow` and `attempt.flow`
4492
4733
  * @returns Flow function
4493
4734
  */
4494
4735
  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>;
4495
4736
  /**
4496
4737
  * Create a Flow, a function that attempts to pipe values through a series of functions
4738
+ *
4739
+ * Available as `attemptFlow` and `attempt.flow`
4497
4740
  * @returns Flow function
4498
4741
  */
4499
4742
  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>;
4500
4743
  /**
4501
4744
  * Create a Flow, a function that attempts to pipe values through a series of functions
4745
+ *
4746
+ * Available as `attemptFlow` and `attempt.flow`
4502
4747
  * @returns Flow function
4503
4748
  */
4504
4749
  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>;
4505
4750
  /**
4506
4751
  * Create a Flow, a function that attempts to pipe values through a series of functions
4752
+ *
4753
+ * Available as `attemptFlow` and `attempt.flow`
4507
4754
  * @returns Flow function
4508
4755
  */
4509
4756
  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>;
4510
4757
  /**
4511
4758
  * Create a Flow, a function that attempts to pipe values through a series of functions
4759
+ *
4760
+ * Available as `attemptFlow` and `attempt.flow`
4512
4761
  * @returns Flow function
4513
4762
  */
4514
4763
  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>;
4515
4764
  /**
4516
4765
  * Create a Flow, a function that attempts to pipe values through a series of functions
4766
+ *
4767
+ * Available as `attemptFlow` and `attempt.flow`
4517
4768
  * @returns Flow function
4518
4769
  */
4519
4770
  declare function attemptFlow<First extends GenericCallback>(first: First, ...fns: Array<(value: UnwrapValue<ReturnType<First>>) => unknown>): AttemptFlow<First, ReturnType<First>>;
4520
4771
  /**
4521
4772
  * Create a Flow, a function that attempts to pipe values through a series of functions
4773
+ *
4774
+ * Available as `attemptFlow` and `attempt.flow`
4522
4775
  * @returns Flow function
4523
4776
  */
4524
4777
  declare function attemptFlow(...fns: GenericCallback[]): (...args: unknown[]) => Result<unknown>;
@@ -4528,270 +4781,182 @@ declare namespace attemptFlow {
4528
4781
  //#endregion
4529
4782
  //#region src/result/work/pipe.d.ts
4530
4783
  type WrapValue<Value> = Result<UnwrapValue<Value>>;
4531
- /**
4532
- * Attempt to pipe a result through a function
4533
- * @param initial Initial result
4534
- * @returns Piped result
4535
- */
4536
- declare function attemptAsyncPipe<Initial, Piped>(initial: Result<Initial>, pipe: (value: UnwrapValue<Initial>) => Piped): Promise<WrapValue<Piped>>;
4537
- /**
4538
- * Attempt to pipe a result through a series of functions
4539
- * @param initial Initial result
4540
- * @returns Piped result
4541
- */
4542
- declare function attemptAsyncPipe<Initial, First, Second>(initial: Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second): Promise<WrapValue<Second>>;
4543
- /**
4544
- * Attempt to pipe a result through a series of functions
4545
- * @param initial Initial result
4546
- * @returns Piped result
4547
- */
4548
- declare function attemptAsyncPipe<Initial, First, Second, Third>(initial: Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third): Promise<WrapValue<Third>>;
4549
- /**
4550
- * Attempt to pipe a result through a series of functions
4551
- * @param initial Initial result
4552
- * @returns Piped result
4553
- */
4554
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth>(initial: Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth): Promise<WrapValue<Fourth>>;
4555
- /**
4556
- * Attempt to pipe a result through a series of functions
4557
- * @param initial Initial result
4558
- * @returns Piped result
4559
- */
4560
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth>(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): Promise<WrapValue<Fifth>>;
4561
- /**
4562
- * Attempt to pipe a result through a series of functions
4563
- * @param initial Initial result
4564
- * @returns Piped result
4565
- */
4566
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth>(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): Promise<WrapValue<Sixth>>;
4567
- /**
4568
- * Attempt to pipe a result through a series of functions
4569
- * @param initial Initial result
4570
- * @returns Piped result
4571
- */
4572
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh>(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): Promise<WrapValue<Seventh>>;
4573
- /**
4574
- * Attempt to pipe a result through a series of functions
4575
- * @param initial Initial result
4576
- * @returns Piped result
4577
- */
4578
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(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): Promise<WrapValue<Eighth>>;
4579
- /**
4580
- * Attempt to pipe a result through a series of functions
4581
- * @param initial Initial result
4582
- * @returns Piped result
4583
- */
4584
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth>(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): Promise<WrapValue<Ninth>>;
4585
- /**
4586
- * Attempt to pipe a result through a series of functions
4587
- * @param initial Initial result
4588
- * @returns Piped result
4589
- */
4590
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth>(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): Promise<WrapValue<Tenth>>;
4591
4784
  /**
4592
4785
  * Attempt to pipe a value through a function
4786
+ *
4787
+ * Available as `attemptAsyncPipe` and `attempt.pipe.async`
4593
4788
  * @param initial Initial value
4594
4789
  * @returns Piped result
4595
4790
  */
4596
- declare function attemptAsyncPipe<Initial, Piped>(initial: GenericCallback | Initial, pipe: (value: UnwrapValue<Initial>) => Piped): Promise<WrapValue<Piped>>;
4791
+ declare function attemptAsyncPipe<Initial, Piped>(initial: GenericCallback | Initial | Promise<Initial> | Result<Initial>, pipe: (value: UnwrapValue<Initial>) => Piped): Promise<WrapValue<Piped>>;
4597
4792
  /**
4598
4793
  * Attempt to pipe a value through a series of functions
4794
+ *
4795
+ * Available as `attemptAsyncPipe` and `attempt.pipe.async`
4599
4796
  * @param initial Initial value
4600
4797
  * @returns Piped result
4601
4798
  */
4602
- declare function attemptAsyncPipe<Initial, First, Second>(initial: GenericCallback | Initial, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second): Promise<WrapValue<Second>>;
4799
+ declare function attemptAsyncPipe<Initial, First, Second>(initial: GenericCallback | Initial | Promise<Initial> | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second): Promise<WrapValue<Second>>;
4603
4800
  /**
4604
4801
  * Attempt to pipe a value through a series of functions
4802
+ *
4803
+ * Available as `attemptAsyncPipe` and `attempt.pipe.async`
4605
4804
  * @param initial Initial value
4606
4805
  * @returns Piped result
4607
4806
  */
4608
- declare function attemptAsyncPipe<Initial, First, Second, Third>(initial: GenericCallback | Initial, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third): Promise<WrapValue<Third>>;
4807
+ declare function attemptAsyncPipe<Initial, First, Second, Third>(initial: GenericCallback | Initial | Promise<Initial> | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third): Promise<WrapValue<Third>>;
4609
4808
  /**
4610
4809
  * Attempt to pipe a value through a series of functions
4810
+ *
4811
+ * Available as `attemptAsyncPipe` and `attempt.pipe.async`
4611
4812
  * @param initial Initial value
4612
4813
  * @returns Piped result
4613
4814
  */
4614
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth>(initial: GenericCallback | Initial, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth): Promise<WrapValue<Fourth>>;
4815
+ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth>(initial: GenericCallback | Initial | Promise<Initial> | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth): Promise<WrapValue<Fourth>>;
4615
4816
  /**
4616
4817
  * Attempt to pipe a value through a series of functions
4818
+ *
4819
+ * Available as `attemptAsyncPipe` and `attempt.pipe.async`
4617
4820
  * @param initial Initial value
4618
4821
  * @returns Piped result
4619
4822
  */
4620
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth>(initial: GenericCallback | 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): Promise<WrapValue<Fifth>>;
4823
+ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth>(initial: GenericCallback | Initial | Promise<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): Promise<WrapValue<Fifth>>;
4621
4824
  /**
4622
4825
  * Attempt to pipe a value through a series of functions
4826
+ *
4827
+ * Available as `attemptAsyncPipe` and `attempt.pipe.async`
4623
4828
  * @param initial Initial value
4624
4829
  * @returns Piped result
4625
4830
  */
4626
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth>(initial: GenericCallback | 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): Promise<WrapValue<Sixth>>;
4831
+ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth>(initial: GenericCallback | Initial | Promise<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): Promise<WrapValue<Sixth>>;
4627
4832
  /**
4628
4833
  * Attempt to pipe a value through a series of functions
4834
+ *
4835
+ * Available as `attemptAsyncPipe` and `attempt.pipe.async`
4629
4836
  * @param initial Initial value
4630
4837
  * @returns Piped result
4631
4838
  */
4632
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh>(initial: GenericCallback | 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): Promise<WrapValue<Seventh>>;
4839
+ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh>(initial: GenericCallback | Initial | Promise<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): Promise<WrapValue<Seventh>>;
4633
4840
  /**
4634
4841
  * Attempt to pipe a value through a series of functions
4842
+ *
4843
+ * Available as `attemptAsyncPipe` and `attempt.pipe.async`
4635
4844
  * @param initial Initial value
4636
4845
  * @returns Piped result
4637
4846
  */
4638
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(initial: GenericCallback | 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): Promise<WrapValue<Eighth>>;
4847
+ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(initial: GenericCallback | Initial | Promise<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): Promise<WrapValue<Eighth>>;
4639
4848
  /**
4640
4849
  * Attempt to pipe a value through a series of functions
4850
+ *
4851
+ * Available as `attemptAsyncPipe` and `attempt.pipe.async`
4641
4852
  * @param initial Initial value
4642
4853
  * @returns Piped result
4643
4854
  */
4644
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth>(initial: GenericCallback | 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): Promise<WrapValue<Ninth>>;
4855
+ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth>(initial: GenericCallback | Initial | Promise<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): Promise<WrapValue<Ninth>>;
4645
4856
  /**
4646
4857
  * Attempt to pipe a value through a series of functions
4858
+ *
4859
+ * Available as `attemptAsyncPipe` and `attempt.pipe.async`
4647
4860
  * @param initial Initial value
4648
4861
  * @returns Piped result
4649
4862
  */
4650
- declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth>(initial: GenericCallback | 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): Promise<WrapValue<Tenth>>;
4651
- /**
4652
- * Attempt to pipe a result through a series of functions
4653
- * @param initial Initial result
4654
- * @returns Piped result
4655
- */
4656
- declare function attemptAsyncPipe<Initial>(initial: Result<Initial>, first?: (value: UnwrapValue<Initial>) => unknown, ...seconds: Array<(value: unknown) => unknown>): Promise<WrapValue<Initial>>;
4657
- /**
4658
- * Attempt to pipe an item through a series of functions
4659
- * @param item Initial value
4660
- * @returns Piped result
4661
- */
4662
- declare function attemptAsyncPipe<Initial>(initial: GenericCallback | Initial, first?: (value: UnwrapValue<Initial>) => unknown, ...seconds: Array<(value: unknown) => unknown>): Promise<WrapValue<Initial>>;
4663
- /**
4664
- * Attempt to pipe a result through a function
4665
- * @param initial Initial result
4666
- * @returns Piped result
4667
- */
4668
- declare function attemptPipe<Initial, Piped>(initial: Result<Initial>, pipe: (value: UnwrapValue<Initial>) => Piped): WrapValue<Piped>;
4669
- /**
4670
- * Attempt to pipe a result through a series of functions
4671
- * @param initial Initial result
4672
- * @returns Piped result
4673
- */
4674
- declare function attemptPipe<Initial, First, Second>(initial: Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second): WrapValue<Second>;
4675
- /**
4676
- * Attempt to pipe a result through a series of functions
4677
- * @param initial Initial result
4678
- * @returns Piped result
4679
- */
4680
- declare function attemptPipe<Initial, First, Second, Third>(initial: Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third): WrapValue<Third>;
4681
- /**
4682
- * Attempt to pipe a result through a series of functions
4683
- * @param initial Initial result
4684
- * @returns Piped result
4685
- */
4686
- declare function attemptPipe<Initial, First, Second, Third, Fourth>(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>;
4687
- /**
4688
- * Attempt to pipe a result through a series of functions
4689
- * @param initial Initial result
4690
- * @returns Piped result
4691
- */
4692
- declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth>(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>;
4693
- /**
4694
- * Attempt to pipe a result through a series of functions
4695
- * @param initial Initial result
4696
- * @returns Piped result
4697
- */
4698
- declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth>(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>;
4699
- /**
4700
- * Attempt to pipe a result through a series of functions
4701
- * @param initial Initial result
4702
- * @returns Piped result
4703
- */
4704
- declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh>(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>;
4705
- /**
4706
- * Attempt to pipe a result through a series of functions
4707
- * @param initial Initial result
4708
- * @returns Piped result
4709
- */
4710
- declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(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>;
4711
- /**
4712
- * Attempt to pipe a result through a series of functions
4713
- * @param initial Initial result
4714
- * @returns Piped result
4715
- */
4716
- declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth>(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>;
4863
+ declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth>(initial: GenericCallback | Initial | Promise<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): Promise<WrapValue<Tenth>>;
4717
4864
  /**
4718
4865
  * Attempt to pipe a result through a series of functions
4866
+ *
4867
+ * Available as `attemptAsyncPipe` and `attempt.pipe.async`
4719
4868
  * @param initial Initial result
4720
4869
  * @returns Piped result
4721
4870
  */
4722
- declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth>(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>;
4871
+ declare function attemptAsyncPipe<Initial>(initial: GenericCallback | Initial | Promise<Initial> | Result<Initial>, first?: (value: UnwrapValue<Initial>) => unknown, ...seconds: Array<(value: unknown) => unknown>): Promise<WrapValue<Initial>>;
4723
4872
  /**
4724
4873
  * Attempt to pipe a value through a function
4874
+ *
4875
+ * Available as `attemptPipe` and `attempt.pipe`
4725
4876
  * @param initial Initial value
4726
4877
  * @returns Piped result
4727
4878
  */
4728
- declare function attemptPipe<Initial, Pipe>(initial: GenericCallback | Initial, pipe: (value: UnwrapValue<Initial>) => Pipe): WrapValue<Pipe>;
4879
+ declare function attemptPipe<Initial, Pipe>(initial: GenericCallback | Initial | Result<Initial>, pipe: (value: UnwrapValue<Initial>) => Pipe): WrapValue<Pipe>;
4729
4880
  /**
4730
4881
  * Attempt to pipe a value through a series of functions
4882
+ *
4883
+ * Available as `attemptPipe` and `attempt.pipe`
4731
4884
  * @param initial Initial value
4732
4885
  * @returns Piped result
4733
4886
  */
4734
- declare function attemptPipe<Initial, First, Second>(initial: GenericCallback | Initial, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second): WrapValue<Second>;
4887
+ declare function attemptPipe<Initial, First, Second>(initial: GenericCallback | Initial | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second): WrapValue<Second>;
4735
4888
  /**
4736
4889
  * Attempt to pipe a value through a series of functions
4890
+ *
4891
+ * Available as `attemptPipe` and `attempt.pipe`
4737
4892
  * @param initial Initial value
4738
4893
  * @returns Piped result
4739
4894
  */
4740
- declare function attemptPipe<Initial, First, Second, Third>(initial: GenericCallback | Initial, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third): WrapValue<Third>;
4895
+ 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>;
4741
4896
  /**
4742
4897
  * Attempt to pipe a value through a series of functions
4898
+ *
4899
+ * Available as `attemptPipe` and `attempt.pipe`
4743
4900
  * @param initial Initial value
4744
4901
  * @returns Piped result
4745
4902
  */
4746
- declare function attemptPipe<Initial, First, Second, Third, Fourth>(initial: GenericCallback | Initial, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth): WrapValue<Fourth>;
4903
+ 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>;
4747
4904
  /**
4748
4905
  * Attempt to pipe a value through a series of functions
4906
+ *
4907
+ * Available as `attemptPipe` and `attempt.pipe`
4749
4908
  * @param initial Initial value
4750
4909
  * @returns Piped result
4751
4910
  */
4752
- declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth>(initial: GenericCallback | 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>;
4911
+ 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>;
4753
4912
  /**
4754
4913
  * Attempt to pipe a value through a series of functions
4914
+ *
4915
+ * Available as `attemptPipe` and `attempt.pipe`
4755
4916
  * @param initial Initial value
4756
4917
  * @returns Piped result
4757
4918
  */
4758
- declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth>(initial: GenericCallback | 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>;
4919
+ 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>;
4759
4920
  /**
4760
4921
  * Attempt to pipe a value through a series of functions
4922
+ *
4923
+ * Available as `attemptPipe` and `attempt.pipe`
4761
4924
  * @param initial Initial value
4762
4925
  * @returns Piped result
4763
4926
  */
4764
- declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh>(initial: GenericCallback | 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>;
4927
+ 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>;
4765
4928
  /**
4766
4929
  * Attempt to pipe a value through a series of functions
4930
+ *
4931
+ * Available as `attemptPipe` and `attempt.pipe`
4767
4932
  * @param initial Initial value
4768
4933
  * @returns Piped result
4769
4934
  */
4770
- declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(initial: GenericCallback | 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>;
4935
+ 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>;
4771
4936
  /**
4772
4937
  * Attempt to pipe a value through a series of functions
4938
+ *
4939
+ * Available as `attemptPipe` and `attempt.pipe`
4773
4940
  * @param initial Initial value
4774
4941
  * @returns Piped result
4775
4942
  */
4776
- declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth>(initial: GenericCallback | 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>;
4943
+ 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>;
4777
4944
  /**
4778
4945
  * Attempt to pipe a value through a series of functions
4946
+ *
4947
+ * Available as `attemptPipe` and `attempt.pipe`
4779
4948
  * @param initial Initial value
4780
4949
  * @returns Piped result
4781
4950
  */
4782
- declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth>(initial: GenericCallback | 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>;
4951
+ 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>;
4783
4952
  /**
4784
4953
  * Attempt to pipe a result through a series of functions
4954
+ *
4955
+ * Available as `attemptPipe` and `attempt.pipe`
4785
4956
  * @param initial Initial result
4786
4957
  * @returns Piped result
4787
4958
  */
4788
- declare function attemptPipe<Initial>(initial: Result<Initial>, first?: (value: UnwrapValue<Initial>) => unknown, ...seconds: Array<(value: unknown) => unknown>): WrapValue<Initial>;
4789
- /**
4790
- * Attempt to pipe an item through a series of functions
4791
- * @param item Initial value
4792
- * @returns Piped result
4793
- */
4794
- declare function attemptPipe<Initial>(initial: GenericCallback | Initial, first?: (value: UnwrapValue<Initial>) => unknown, ...seconds: Array<(value: unknown) => unknown>): WrapValue<Initial>;
4959
+ declare function attemptPipe<Initial>(initial: GenericCallback | Initial | Result<Initial>, first?: (value: UnwrapValue<Initial>) => unknown, ...seconds: Array<(value: unknown) => unknown>): WrapValue<Initial>;
4795
4960
  declare namespace attemptPipe {
4796
4961
  var async: typeof attemptAsyncPipe;
4797
4962
  }
@@ -4799,6 +4964,8 @@ declare namespace attemptPipe {
4799
4964
  //#region src/result/index.d.ts
4800
4965
  /**
4801
4966
  * Executes a promise, catching any errors, and returns a result
4967
+ *
4968
+ * Available as `asyncAttempt` and `attempt.async`
4802
4969
  * @param promise Promise to execute
4803
4970
  * @param error Error value
4804
4971
  * @returns Callback result
@@ -4806,6 +4973,8 @@ declare namespace attemptPipe {
4806
4973
  declare function asyncAttempt<Value, E>(promise: Promise<Value>, error: E): Promise<ExtendedResult<Awaited<Value>, E>>;
4807
4974
  /**
4808
4975
  * Executes a callback asynchronously, catching any errors, and returns a result
4976
+ *
4977
+ * Available as `asyncAttempt` and `attempt.async`
4809
4978
  * @param callback Callback to execute
4810
4979
  * @param error Error value
4811
4980
  * @returns Callback result
@@ -4813,12 +4982,16 @@ declare function asyncAttempt<Value, E>(promise: Promise<Value>, error: E): Prom
4813
4982
  declare function asyncAttempt<Value, E>(callback: () => Promise<Value>, error: E): Promise<ExtendedResult<Awaited<Value>, E>>;
4814
4983
  /**
4815
4984
  * Executes a promise, catching any errors, and returns a result
4985
+ *
4986
+ * Available as `asyncAttempt` and `attempt.async`
4816
4987
  * @param promise Promise to execute
4817
4988
  * @returns Callback result
4818
4989
  */
4819
4990
  declare function asyncAttempt<Value>(promise: Promise<Value>): Promise<Result<Awaited<Value>>>;
4820
4991
  /**
4821
4992
  * Executes a callback asynchronously, catching any errors, and returns a result
4993
+ *
4994
+ * Available as `asyncAttempt` and `attempt.async`
4822
4995
  * @param callback Callback to execute
4823
4996
  * @returns Callback result
4824
4997
  */
@@ -4933,4 +5106,4 @@ declare class SizedSet<Value = unknown> extends Set<Value> {
4933
5106
  get(value: Value, update?: boolean): Value | undefined;
4934
5107
  }
4935
5108
  //#endregion
4936
- export { AnyResult, ArrayComparisonSorter, ArrayKeySorter, ArrayOrPlainObject, ArrayPosition, ArrayValueSorter, Asserter, AsyncCancelableCallback, AttemptFlow, AttemptFlowPromise, type Beacon, type BeaconOptions, BuiltIns, CancelableCallback, CancelablePromise, type Color, Constructor, DiffOptions, DiffResult, DiffValue, EqualOptions, Err, EventPosition, ExtendedErr, ExtendedResult, Flow, FlowPromise, FulfilledPromise, FuzzyConfiguration, FuzzyOptions, FuzzyResult, FuzzySearchOptions, GenericAsyncCallback, GenericCallback, type HSLAColor, type HSLColor, HasValue, Key, KeyedValue, type Logger, type Memoized, type MemoizedOptions, MergeOptions, Merger, NestedArray, NestedKeys, NestedPartial, NestedValue, NestedValues, NumericalKeys, NumericalValues, type Observable, type Observer, Ok, OnceAsyncCallback, OnceCallback, PROMISE_ABORT_EVENT, PROMISE_ABORT_OPTIONS, PROMISE_ERROR_NAME, PROMISE_MESSAGE_EXPECTATION_ATTEMPT, PROMISE_MESSAGE_EXPECTATION_RESULT, PROMISE_MESSAGE_EXPECTATION_TIMED, PROMISE_MESSAGE_TIMEOUT, PROMISE_STRATEGY_ALL, PROMISE_STRATEGY_DEFAULT, PROMISE_TYPE_FULFILLED, PROMISE_TYPE_REJECTED, PlainObject, Primitive, PromiseData, PromiseHandlers, PromiseOptions, PromiseParameters, PromiseStrategy, PromiseTimeoutError, PromisesItems, PromisesOptions, PromisesResult, PromisesUnwrapped, PromisesValue, PromisesValues, type Queue, QueueError, type QueueOptions, type Queued, type QueuedResult, type RGBAColor, type RGBColor, RejectedPromise, RequiredKeys, Result, ResultMatch, RetryError, RetryOptions, SORT_DIRECTION_ASCENDING, SORT_DIRECTION_DESCENDING, Simplify, SizedMap, SizedSet, Smushed, SortDirection, Sorter, type Subscription, TemplateOptions, type Time, ToString, TypedArray, Unsmushed, UnwrapValue, assert, attempt, attemptFlow, attemptPipe, attemptPromise, average, beacon, between, camelCase, cancelable, capitalize, ceil, chunk, clamp, clone, compact, compare, count, debounce, dedent, delay, diff, difference, drop, endsWith, endsWithArray, equal, error, exists, filter, find, first, flatten, floor, flow, fromQuery, toPromise as fromResult, toPromise, fuzzy, getArray, getArrayPosition, getColor, getError, getForegroundColor, getHexColor, getHexaColor, getHslColor, getHslaColor, getNormalizedHex, getNumber, getRandomBoolean, getRandomCharacters, getRandomColor, getRandomFloat, getRandomHex, getRandomInteger, getRandomItem, getRandomItems, getRgbColor, getRgbaColor, getString, getTimedPromise, getUuid, getValue, groupBy, handleResult, hasValue, hexToHsl, hexToHsla, hexToRgb, hexToRgba, hslToHex, hslToRgb, hslToRgba, ignoreKey, inMap, inSet, includes, includesArray, indexOf, indexOfArray, insert, intersection, isArrayOrPlainObject, isColor, isConstructor, isEmpty, isError, isFulfilled, isHexColor, isHslColor, isHslLike, isHslaColor, isInstanceOf, isKey, isNonArrayOrPlainObject, isNonConstructor, isNonEmpty, isNonInstanceOf, isNonKey, isNonNullable, isNonNullableOrEmpty, isNonNullableOrWhitespace, isNonNumber, isNonNumerical, isNonObject, isNonPlainObject, isNonPrimitive, isNonTypedArray, isNullable, isNullableOrEmpty, isNullableOrWhitespace, isNumber, isNumerical, isObject, isOk, isPlainObject, isPrimitive, isRejected, isResult, isRgbColor, isRgbLike, isRgbaColor, isTypedArray, join, kebabCase, last, logger, lowerCase, matchResult, max, median, memoize, merge, min, move, noop, ok, omit, once, parse, partition, pascalCase, pick, pipe, promises, push, queue, range, retry, reverse, rgbToHex, rgbToHsl, rgbToHsla, round, select, setValue, settlePromise, shuffle, single, slice, smush, snakeCase, sort, splice, startsWith, startsWithArray, sum, swap, take, template, throttle, timed, times, titleCase, toMap, toQuery, toRecord, toResult, toSet, toggle, trim, truncate, tryDecode, tryEncode, union, unique, unsmush, unwrap, update, upperCase, words };
5109
+ export { AnyResult, ArrayComparisonSorter, ArrayKeySorter, ArrayOrPlainObject, ArrayPosition, ArrayValueSorter, Asserter, AsyncCancelableCallback, AttemptFlow, AttemptFlowPromise, type Beacon, type BeaconOptions, BuiltIns, CancelableCallback, CancelablePromise, type Color, Constructor, DiffOptions, DiffResult, DiffValue, EqualOptions, Err, EventPosition, ExtendedErr, ExtendedResult, Flow, FlowPromise, FulfilledPromise, FuzzyConfiguration, FuzzyOptions, FuzzyResult, FuzzySearchOptions, GenericAsyncCallback, GenericCallback, type HSLAColor, type HSLColor, Key, KeyedValue, type Logger, type Memoized, type MemoizedOptions, MergeOptions, Merger, NestedArray, NestedKeys, NestedPartial, NestedValue, NestedValues, NumericalKeys, NumericalValues, type Observable, type Observer, Ok, OnceAsyncCallback, OnceCallback, PROMISE_ABORT_EVENT, PROMISE_ABORT_OPTIONS, PROMISE_ERROR_NAME, PROMISE_MESSAGE_EXPECTATION_ATTEMPT, PROMISE_MESSAGE_EXPECTATION_RESULT, PROMISE_MESSAGE_EXPECTATION_TIMED, PROMISE_MESSAGE_TIMEOUT, PROMISE_STRATEGY_ALL, PROMISE_STRATEGY_DEFAULT, PROMISE_TYPE_FULFILLED, PROMISE_TYPE_REJECTED, PlainObject, Primitive, PromiseData, PromiseHandlers, PromiseOptions, PromiseParameters, PromiseStrategy, PromiseTimeoutError, PromisesItems, PromisesOptions, PromisesResult, PromisesUnwrapped, PromisesValue, PromisesValues, type Queue, QueueError, type QueueOptions, type Queued, type QueuedResult, type RGBAColor, type RGBColor, RejectedPromise, RequiredKeys, Result, ResultMatch, RetryError, RetryOptions, SORT_DIRECTION_ASCENDING, SORT_DIRECTION_DESCENDING, Simplify, SizedMap, SizedSet, Smushed, SortDirection, Sorter, type Subscription, TemplateOptions, type Time, ToString, TypedArray, Unsmushed, UnwrapValue, assert, assertCondition, assertDefined, assertInstanceOf, assertIs, asyncAttempt, asyncDebounce, asyncFlow, asyncMatchResult, asyncOnce, asyncPipe, asyncThrottle, attempt, attemptAsyncFlow, attemptAsyncPipe, attemptFlow, attemptPipe, attemptPromise, average, beacon, between, camelCase, cancelable, capitalize, ceil, chunk, clamp, clone, compact, compare, count, debounce, dedent, delay, deregisterCloner, deregisterComparator, deregisterEqualizer, diff, difference, drop, endsWith, endsWithArray, equal, error, exclude, exists, filter, find, first, firstOrDefault, flatten, floor, flow, fromQuery, toPromise as fromResult, toPromise, fuzzy, fuzzyMatch, getArray, getArrayPosition, getColor, getError, getForegroundColor, getHexColor, getHexaColor, getHslColor, getHslaColor, getNormalizedHex, getNumber, getRandomBoolean, getRandomCharacters, getRandomColor, getRandomFloat, getRandomHex, getRandomInteger, getRandomItem, getRandomItems, getRgbColor, getRgbaColor, getSortedIndex, getString, getTimedPromise, getUuid, getValue, groupArraysBy, groupBy, handleResult, hasValue, hexToHsl, hexToHsla, hexToRgb, hexToRgba, hslToHex, hslToRgb, hslToRgba, ignoreKey, inMap, inSet, includes, includesArray, indexOf, indexOfArray, initializeEqualizer, initializeMerger, initializeSorter, initializeTemplater, insert, intersection, isArrayOrPlainObject, isColor, isConstructor, isEmpty, isError, isFulfilled, isHexColor, isHslColor, isHslLike, isHslaColor, isInstanceOf, isKey, isNonArrayOrPlainObject, isNonConstructor, isNonEmpty, isNonInstanceOf, isNonKey, isNonNullable, isNonNullableOrEmpty, isNonNullableOrWhitespace, isNonNumber, isNonNumerical, isNonObject, isNonPlainObject, isNonPrimitive, isNonTypedArray, isNullable, isNullableOrEmpty, isNullableOrWhitespace, isNumber, isNumerical, isObject, isOk, isPlainObject, isPrimitive, isRejected, isResult, isRgbColor, isRgbLike, isRgbaColor, isSorted, isTypedArray, join, kebabCase, last, lastOrDefault, logger, lowerCase, matchResult, max, median, memoize, merge, min, move, moveIndices, moveToIndex, noop, ok, omit, once, parse, partition, pascalCase, pick, pipe, promises, push, queue, range, registerCloner, registerComparator, registerEqualizer, resultPromises, retry, reverse, rgbToHex, rgbToHsl, rgbToHsla, round, select, setValue, settlePromise, shuffle, single, slice, smush, snakeCase, sort, splice, startsWith, startsWithArray, sum, swap, take, template, throttle, timed, times, titleCase, toMap, toMapArrays, toQuery, toRecord, toRecordArrays, toResult, toSet, toggle, trim, truncate, tryDecode, tryEncode, union, unique, unsmush, unwrap, update, upperCase, words };