@oscarpalmer/atoms 0.217.0 → 0.218.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 (48) hide show
  1. package/dist/array/insert.mjs +1 -1
  2. package/dist/array/slice.mjs +27 -14
  3. package/dist/array/sort.mjs +2 -1
  4. package/dist/color/misc/get.mjs +3 -1
  5. package/dist/color/space/hex.mjs +1 -1
  6. package/dist/function/retry.d.mts +1 -1
  7. package/dist/function/retry.mjs +5 -2
  8. package/dist/index.d.mts +163 -154
  9. package/dist/index.mjs +227 -145
  10. package/dist/internal/array/find.mjs +57 -34
  11. package/dist/internal/array/insert.mjs +1 -1
  12. package/dist/internal/array/match.mjs +21 -17
  13. package/dist/internal/array/sets.mjs +7 -1
  14. package/dist/internal/math/aggregate.mjs +4 -1
  15. package/dist/internal/number.d.mts +1 -1
  16. package/dist/internal/number.mjs +4 -2
  17. package/dist/internal/plan/plan.generate.mjs +3 -3
  18. package/dist/internal/random.d.mts +6 -0
  19. package/dist/internal/random.mjs +13 -2
  20. package/dist/internal/result/attempt.mjs +4 -4
  21. package/dist/internal/string/misc.mjs +2 -1
  22. package/dist/internal/subscription.mjs +1 -1
  23. package/dist/internal/value/equal.mjs +2 -1
  24. package/dist/internal/value/partial.mjs +3 -1
  25. package/dist/models/plan.model.d.mts +2 -0
  26. package/dist/models/plan.model.mjs +3 -1
  27. package/dist/models/string/string.fuzzy.model.d.mts +1 -1
  28. package/dist/models/string/string.misc.model.mjs +1 -1
  29. package/dist/models/value/value.merge.model.d.mts +1 -1
  30. package/dist/plan/index.d.mts +1 -4
  31. package/dist/plan/index.mjs +2 -3
  32. package/dist/plan/use.mjs +4 -4
  33. package/dist/promise/index.d.mts +6 -4
  34. package/dist/promise/index.mjs +4 -4
  35. package/dist/promise/misc.mjs +5 -2
  36. package/dist/promise/timed.mjs +2 -2
  37. package/dist/queue.mjs +4 -5
  38. package/dist/random.d.mts +2 -2
  39. package/dist/random.mjs +3 -3
  40. package/dist/result/match.mjs +2 -2
  41. package/dist/result/misc.mjs +3 -10
  42. package/dist/result/work/pipe.d.mts +24 -22
  43. package/dist/result/work/pipe.mjs +7 -3
  44. package/dist/string/fuzzy.mjs +1 -1
  45. package/dist/string/index.mjs +1 -1
  46. package/dist/value/clone.mjs +1 -1
  47. package/dist/value/merge.mjs +17 -4
  48. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -3378,7 +3378,7 @@ declare function asyncRetry<Callback extends GenericAsyncCallback>(callback: Cal
3378
3378
  * @param options Retry options
3379
3379
  * @returns Callback result
3380
3380
  */
3381
- declare function asyncRetry<Callback extends GenericCallback>(callback: Callback, options?: RetryOptions): Promise<ReturnType<Callback>>;
3381
+ declare function asyncRetry<Callback extends GenericAsyncCallback>(callback: Callback, options?: RetryOptions): Promise<ReturnType<Callback>>;
3382
3382
  /**
3383
3383
  * Retry a callback a specified number of times
3384
3384
  *
@@ -4826,132 +4826,6 @@ type Success<Value> = {
4826
4826
  [Symbol.iterator]: () => Generator<never, Value>;
4827
4827
  };
4828
4828
  //#endregion
4829
- //#region src/plan/result.d.ts
4830
- /**
4831
- * Attempt to run the generator to completion
4832
- *
4833
- * _Returns a promised {@link Result} instead of a raw value or throwing an error_
4834
- *
4835
- * @param generator Generator to run
4836
- * @param parameters Parameters for starting the run
4837
- * @param signal Optional abort signal
4838
- * @returns Promised result
4839
- */
4840
- export declare function asyncAttemptRun<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => AsyncGenerator<Yielded, Returned>, parameters: Parameters, signal?: AbortSignal): Promise<Result<PlanOk<Returned>, PlanError<Yielded, Returned>>>;
4841
- /**
4842
- * Attempt to run the generator to completion
4843
- *
4844
- * _Returns a promised {@link Result} instead of a raw value or throwing an error_
4845
- *
4846
- * @param generator Generator to run
4847
- * @param signal Optional abort signal
4848
- * @returns Promised result
4849
- */
4850
- export declare function asyncAttemptRun<Yielded, Returned>(generator: () => AsyncGenerator<Yielded, Returned>, signal?: AbortSignal): Promise<Result<PlanOk<Returned>, PlanError<Yielded, Returned>>>;
4851
- /**
4852
- * Attempt to run the plan to completion
4853
- *
4854
- * _Returns a promised {@link Result} instead of a raw value or throwing an error_
4855
- *
4856
- * @param plan Plan to run
4857
- * @param parameters Parameters for starting the run
4858
- * @param signal Optional abort signal
4859
- * @returns Promised result
4860
- */
4861
- export declare function asyncAttemptRun<Yielded, Returned, Parameters extends unknown[]>(plan: AsyncPlan<Yielded, Returned, Parameters>, parameters: Parameters, signal?: AbortSignal): Promise<Result<PlanOk<Returned>, PlanError<Yielded, Returned>>>;
4862
- /**
4863
- * Attempt to run the plan to completion
4864
- *
4865
- * _Returns a promised {@link Result} instead of a raw value or throwing an error_
4866
- *
4867
- * @param plan Plan to run
4868
- * @param signal Optional abort signal
4869
- * @returns Promised result
4870
- */
4871
- export declare function asyncAttemptRun<Yielded, Returned>(plan: AsyncPlan<Yielded, Returned, []>, signal?: AbortSignal): Promise<Result<PlanOk<Returned>, PlanError<Yielded, Returned>>>;
4872
- /**
4873
- * Attempt to run the generator to completion
4874
- *
4875
- * _Returns a {@link Result} instead of a raw value or throwing an error_
4876
- *
4877
- * @param generator Generator to run
4878
- * @param parameters Parameters for starting the run
4879
- * @returns Result
4880
- */
4881
- export declare function attemptRun<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => Generator<Yielded, Returned>, ...parameters: Parameters): Result<PlanOk<Returned>, PlanError<Yielded, Returned>>;
4882
- /**
4883
- * Attempt to run the plan to completion
4884
- *
4885
- * _Returns a {@link Result} instead of a raw value or throwing an error_
4886
- *
4887
- * @param plan Plan to run
4888
- * @param parameters Parameters for starting the run
4889
- * @returns Result
4890
- */
4891
- export declare function attemptRun<Yielded, Returned, Parameters extends unknown[]>(plan: Plan<Yielded, Returned, Parameters>, ...parameters: Parameters): Result<PlanOk<Returned>, PlanError<Yielded, Returned>>;
4892
- export declare namespace attemptRun {
4893
- export var async: typeof asyncAttemptRun;
4894
- }
4895
- //#endregion
4896
- //#region src/plan/run.d.ts
4897
- /**
4898
- * Run an asynchronous generator to completion
4899
- *
4900
- * @param generator Generator to run
4901
- * @param parameters Parameters for starting the run
4902
- * @param signal Optional abort signal
4903
- * @returns Result
4904
- */
4905
- export declare function asyncRun<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => AsyncGenerator<Yielded, Returned>, parameters: Parameters, signal?: AbortSignal): Promise<PlanReturned<Returned>>;
4906
- /**
4907
- * Run an asynchronous generator to completion
4908
- *
4909
- * @param generator Generator to run
4910
- * @param signal Optional abort signal
4911
- * @returns Result
4912
- */
4913
- export declare function asyncRun<Yielded, Returned>(generator: () => AsyncGenerator<Yielded, Returned>, signal?: AbortSignal): Promise<PlanReturned<Returned>>;
4914
- /**
4915
- * Run an asynchronous plan to completion
4916
- *
4917
- * @param plan Plan to run
4918
- * @param parameters Parameters for starting the run
4919
- * @param signal Optional abort signal
4920
- * @returns Result
4921
- */
4922
- export declare function asyncRun<Yielded, Returned, Parameters extends unknown[]>(plan: AsyncPlan<Yielded, Returned, Parameters>, parameters: Parameters, signal?: AbortSignal): Promise<PlanReturned<Returned>>;
4923
- /**
4924
- * Run an asynchronous plan to completion
4925
- *
4926
- * @param plan Plan to run
4927
- * @param signal Optional abort signal
4928
- * @returns Result
4929
- */
4930
- export declare function asyncRun<Yielded, Returned>(plan: AsyncPlan<Yielded, Returned, []>, signal?: AbortSignal): Promise<PlanReturned<Returned>>;
4931
- /**
4932
- * Run a generator to completion
4933
- *
4934
- * @param generator Generator to run
4935
- * @param parameters Parameters for starting the run
4936
- * @returns Result
4937
- */
4938
- export declare function run<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => Generator<Yielded, Returned>, ...parameters: Parameters): PlanReturned<Returned>;
4939
- /**
4940
- * Run a plan to completion
4941
- *
4942
- * @param plan Plan to run
4943
- * @param parameters Parameters for starting the run
4944
- * @returns Result
4945
- */
4946
- export declare function run<Yielded, Returned, Parameters extends unknown[]>(plan: Plan<Yielded, Returned, Parameters>, ...parameters: Parameters): PlanReturned<Returned>;
4947
- export declare namespace asyncRun {
4948
- export var attempt: typeof asyncAttemptRun;
4949
- }
4950
- export declare namespace run {
4951
- export var async: typeof asyncRun;
4952
- export var attempt: typeof attemptRun;
4953
- }
4954
- //#endregion
4955
4829
  //#region src/plan/index.d.ts
4956
4830
  /**
4957
4831
  * Create a plan for an asynchronous generator function
@@ -5118,6 +4992,132 @@ export declare namespace succeed {
5118
4992
  export var async: typeof asyncSucceed;
5119
4993
  }
5120
4994
  //#endregion
4995
+ //#region src/plan/result.d.ts
4996
+ /**
4997
+ * Attempt to run the generator to completion
4998
+ *
4999
+ * _Returns a promised {@link Result} instead of a raw value or throwing an error_
5000
+ *
5001
+ * @param generator Generator to run
5002
+ * @param parameters Parameters for starting the run
5003
+ * @param signal Optional abort signal
5004
+ * @returns Promised result
5005
+ */
5006
+ export declare function asyncAttemptRun<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => AsyncGenerator<Yielded, Returned>, parameters: Parameters, signal?: AbortSignal): Promise<Result<PlanOk<Returned>, PlanError<Yielded, Returned>>>;
5007
+ /**
5008
+ * Attempt to run the generator to completion
5009
+ *
5010
+ * _Returns a promised {@link Result} instead of a raw value or throwing an error_
5011
+ *
5012
+ * @param generator Generator to run
5013
+ * @param signal Optional abort signal
5014
+ * @returns Promised result
5015
+ */
5016
+ export declare function asyncAttemptRun<Yielded, Returned>(generator: () => AsyncGenerator<Yielded, Returned>, signal?: AbortSignal): Promise<Result<PlanOk<Returned>, PlanError<Yielded, Returned>>>;
5017
+ /**
5018
+ * Attempt to run the plan to completion
5019
+ *
5020
+ * _Returns a promised {@link Result} instead of a raw value or throwing an error_
5021
+ *
5022
+ * @param plan Plan to run
5023
+ * @param parameters Parameters for starting the run
5024
+ * @param signal Optional abort signal
5025
+ * @returns Promised result
5026
+ */
5027
+ export declare function asyncAttemptRun<Yielded, Returned, Parameters extends unknown[]>(plan: AsyncPlan<Yielded, Returned, Parameters>, parameters: Parameters, signal?: AbortSignal): Promise<Result<PlanOk<Returned>, PlanError<Yielded, Returned>>>;
5028
+ /**
5029
+ * Attempt to run the plan to completion
5030
+ *
5031
+ * _Returns a promised {@link Result} instead of a raw value or throwing an error_
5032
+ *
5033
+ * @param plan Plan to run
5034
+ * @param signal Optional abort signal
5035
+ * @returns Promised result
5036
+ */
5037
+ export declare function asyncAttemptRun<Yielded, Returned>(plan: AsyncPlan<Yielded, Returned, []>, signal?: AbortSignal): Promise<Result<PlanOk<Returned>, PlanError<Yielded, Returned>>>;
5038
+ /**
5039
+ * Attempt to run the generator to completion
5040
+ *
5041
+ * _Returns a {@link Result} instead of a raw value or throwing an error_
5042
+ *
5043
+ * @param generator Generator to run
5044
+ * @param parameters Parameters for starting the run
5045
+ * @returns Result
5046
+ */
5047
+ export declare function attemptRun<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => Generator<Yielded, Returned>, ...parameters: Parameters): Result<PlanOk<Returned>, PlanError<Yielded, Returned>>;
5048
+ /**
5049
+ * Attempt to run the plan to completion
5050
+ *
5051
+ * _Returns a {@link Result} instead of a raw value or throwing an error_
5052
+ *
5053
+ * @param plan Plan to run
5054
+ * @param parameters Parameters for starting the run
5055
+ * @returns Result
5056
+ */
5057
+ export declare function attemptRun<Yielded, Returned, Parameters extends unknown[]>(plan: Plan<Yielded, Returned, Parameters>, ...parameters: Parameters): Result<PlanOk<Returned>, PlanError<Yielded, Returned>>;
5058
+ export declare namespace attemptRun {
5059
+ export var async: typeof asyncAttemptRun;
5060
+ }
5061
+ //#endregion
5062
+ //#region src/plan/run.d.ts
5063
+ /**
5064
+ * Run an asynchronous generator to completion
5065
+ *
5066
+ * @param generator Generator to run
5067
+ * @param parameters Parameters for starting the run
5068
+ * @param signal Optional abort signal
5069
+ * @returns Result
5070
+ */
5071
+ export declare function asyncRun<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => AsyncGenerator<Yielded, Returned>, parameters: Parameters, signal?: AbortSignal): Promise<PlanReturned<Returned>>;
5072
+ /**
5073
+ * Run an asynchronous generator to completion
5074
+ *
5075
+ * @param generator Generator to run
5076
+ * @param signal Optional abort signal
5077
+ * @returns Result
5078
+ */
5079
+ export declare function asyncRun<Yielded, Returned>(generator: () => AsyncGenerator<Yielded, Returned>, signal?: AbortSignal): Promise<PlanReturned<Returned>>;
5080
+ /**
5081
+ * Run an asynchronous plan to completion
5082
+ *
5083
+ * @param plan Plan to run
5084
+ * @param parameters Parameters for starting the run
5085
+ * @param signal Optional abort signal
5086
+ * @returns Result
5087
+ */
5088
+ export declare function asyncRun<Yielded, Returned, Parameters extends unknown[]>(plan: AsyncPlan<Yielded, Returned, Parameters>, parameters: Parameters, signal?: AbortSignal): Promise<PlanReturned<Returned>>;
5089
+ /**
5090
+ * Run an asynchronous plan to completion
5091
+ *
5092
+ * @param plan Plan to run
5093
+ * @param signal Optional abort signal
5094
+ * @returns Result
5095
+ */
5096
+ export declare function asyncRun<Yielded, Returned>(plan: AsyncPlan<Yielded, Returned, []>, signal?: AbortSignal): Promise<PlanReturned<Returned>>;
5097
+ /**
5098
+ * Run a generator to completion
5099
+ *
5100
+ * @param generator Generator to run
5101
+ * @param parameters Parameters for starting the run
5102
+ * @returns Result
5103
+ */
5104
+ export declare function run<Yielded, Returned, Parameters extends unknown[]>(generator: (...parameters: Parameters) => Generator<Yielded, Returned>, ...parameters: Parameters): PlanReturned<Returned>;
5105
+ /**
5106
+ * Run a plan to completion
5107
+ *
5108
+ * @param plan Plan to run
5109
+ * @param parameters Parameters for starting the run
5110
+ * @returns Result
5111
+ */
5112
+ export declare function run<Yielded, Returned, Parameters extends unknown[]>(plan: Plan<Yielded, Returned, Parameters>, ...parameters: Parameters): PlanReturned<Returned>;
5113
+ export declare namespace asyncRun {
5114
+ export var attempt: typeof asyncAttemptRun;
5115
+ }
5116
+ export declare namespace run {
5117
+ export var async: typeof asyncRun;
5118
+ export var attempt: typeof attemptRun;
5119
+ }
5120
+ //#endregion
5121
5121
  //#region src/plan/use.d.ts
5122
5122
  /**
5123
5123
  * Create an asynchronous step from a callback
@@ -5281,6 +5281,7 @@ export declare function delay(options?: PromiseOptions): Promise<void>;
5281
5281
  export declare function delay(time?: number): Promise<void>;
5282
5282
  //#endregion
5283
5283
  //#region src/promise/index.d.ts
5284
+ type AttemptPromiseOptions = PromiseOptions | AbortSignal | number;
5284
5285
  /**
5285
5286
  * Wrap a _Promise_ with safety handlers
5286
5287
  *
@@ -5288,7 +5289,7 @@ export declare function delay(time?: number): Promise<void>;
5288
5289
  * @param options Options for the _Promise_
5289
5290
  * @returns Wrapped _Promise_
5290
5291
  */
5291
- export declare function attemptPromise<Value>(promise: Promise<Value>, options?: PromiseOptions | AbortSignal | number): Promise<Value>;
5292
+ export declare function attemptPromise<Value>(promise: Promise<Value>, options?: AttemptPromiseOptions): Promise<Value>;
5292
5293
  /**
5293
5294
  * Wrap a _Promise_-returning callback with safety handlers
5294
5295
  *
@@ -5296,7 +5297,7 @@ export declare function attemptPromise<Value>(promise: Promise<Value>, options?:
5296
5297
  * @param options Options for the _Promise_
5297
5298
  * @returns _Promise_-wrapped callback
5298
5299
  */
5299
- export declare function attemptPromise<Value>(callback: () => Promise<Value>, options?: PromiseOptions | AbortSignal | number): Promise<Value>;
5300
+ export declare function attemptPromise<Value>(callback: () => Promise<Value>, options?: AttemptPromiseOptions): Promise<Value>;
5300
5301
  /**
5301
5302
  * Wrap a callback with a _Promise_ and safety handlers
5302
5303
  *
@@ -5304,7 +5305,7 @@ export declare function attemptPromise<Value>(callback: () => Promise<Value>, op
5304
5305
  * @param options Options for the _Promise_
5305
5306
  * @returns _Promise_-wrapped callback
5306
5307
  */
5307
- export declare function attemptPromise<Value>(callback: () => Value, options?: PromiseOptions | AbortSignal | number): Promise<Value>;
5308
+ export declare function attemptPromise<Value>(callback: () => Value, options?: AttemptPromiseOptions): Promise<Value>;
5308
5309
  /**
5309
5310
  * Handle a list of _Promises_, returning their results in an ordered array
5310
5311
  *
@@ -5840,6 +5841,8 @@ export declare namespace attemptFlow {
5840
5841
  }
5841
5842
  //#endregion
5842
5843
  //#region src/result/work/pipe.d.ts
5844
+ type InitialAsyncPipeValue<Initial> = GenericCallback | Initial | Promise<Initial> | Result<Initial>;
5845
+ type InitialPipeValue<Initial> = GenericCallback | Initial | Result<Initial>;
5843
5846
  type WrapValue<Value> = Result<UnwrapValue<Value>>;
5844
5847
  /**
5845
5848
  * Attempt to pipe a value through a function
@@ -5849,7 +5852,7 @@ type WrapValue<Value> = Result<UnwrapValue<Value>>;
5849
5852
  * @param initial Initial value
5850
5853
  * @returns _Piped_ result
5851
5854
  */
5852
- export declare function attemptAsyncPipe<Initial, Piped>(initial: GenericCallback | Initial | Promise<Initial> | Result<Initial>, pipe: (value: UnwrapValue<Initial>) => Piped): Promise<WrapValue<Piped>>;
5855
+ export declare function attemptAsyncPipe<Initial, Piped>(initial: InitialAsyncPipeValue<Initial>, pipe: (value: UnwrapValue<Initial>) => Piped): Promise<WrapValue<Piped>>;
5853
5856
  /**
5854
5857
  * Attempt to pipe a value through a series of functions
5855
5858
  *
@@ -5858,7 +5861,7 @@ export declare function attemptAsyncPipe<Initial, Piped>(initial: GenericCallbac
5858
5861
  * @param initial Initial value
5859
5862
  * @returns _Piped_ result
5860
5863
  */
5861
- export 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>>;
5864
+ export declare function attemptAsyncPipe<Initial, First, Second>(initial: InitialAsyncPipeValue<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second): Promise<WrapValue<Second>>;
5862
5865
  /**
5863
5866
  * Attempt to pipe a value through a series of functions
5864
5867
  *
@@ -5867,7 +5870,7 @@ export declare function attemptAsyncPipe<Initial, First, Second>(initial: Generi
5867
5870
  * @param initial Initial value
5868
5871
  * @returns _Piped_ result
5869
5872
  */
5870
- export 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>>;
5873
+ export declare function attemptAsyncPipe<Initial, First, Second, Third>(initial: InitialAsyncPipeValue<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third): Promise<WrapValue<Third>>;
5871
5874
  /**
5872
5875
  * Attempt to pipe a value through a series of functions
5873
5876
  *
@@ -5876,7 +5879,7 @@ export declare function attemptAsyncPipe<Initial, First, Second, Third>(initial:
5876
5879
  * @param initial Initial value
5877
5880
  * @returns _Piped_ result
5878
5881
  */
5879
- export 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>>;
5882
+ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth>(initial: InitialAsyncPipeValue<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth): Promise<WrapValue<Fourth>>;
5880
5883
  /**
5881
5884
  * Attempt to pipe a value through a series of functions
5882
5885
  *
@@ -5885,7 +5888,7 @@ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth>(
5885
5888
  * @param initial Initial value
5886
5889
  * @returns _Piped_ result
5887
5890
  */
5888
- export 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>>;
5891
+ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth>(initial: InitialAsyncPipeValue<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>>;
5889
5892
  /**
5890
5893
  * Attempt to pipe a value through a series of functions
5891
5894
  *
@@ -5894,7 +5897,7 @@ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth,
5894
5897
  * @param initial Initial value
5895
5898
  * @returns _Piped_ result
5896
5899
  */
5897
- export 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>>;
5900
+ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth>(initial: InitialAsyncPipeValue<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>>;
5898
5901
  /**
5899
5902
  * Attempt to pipe a value through a series of functions
5900
5903
  *
@@ -5903,7 +5906,7 @@ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth,
5903
5906
  * @param initial Initial value
5904
5907
  * @returns _Piped_ result
5905
5908
  */
5906
- export 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>>;
5909
+ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh>(initial: InitialAsyncPipeValue<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>>;
5907
5910
  /**
5908
5911
  * Attempt to pipe a value through a series of functions
5909
5912
  *
@@ -5912,7 +5915,7 @@ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth,
5912
5915
  * @param initial Initial value
5913
5916
  * @returns _Piped_ result
5914
5917
  */
5915
- export 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>>;
5918
+ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(initial: InitialAsyncPipeValue<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>>;
5916
5919
  /**
5917
5920
  * Attempt to pipe a value through a series of functions
5918
5921
  *
@@ -5921,7 +5924,7 @@ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth,
5921
5924
  * @param initial Initial value
5922
5925
  * @returns _Piped_ result
5923
5926
  */
5924
- export 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>>;
5927
+ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth>(initial: InitialAsyncPipeValue<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>>;
5925
5928
  /**
5926
5929
  * Attempt to pipe a value through a series of functions
5927
5930
  *
@@ -5930,7 +5933,7 @@ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth,
5930
5933
  * @param initial Initial value
5931
5934
  * @returns _Piped_ result
5932
5935
  */
5933
- export 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>>;
5936
+ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth>(initial: InitialAsyncPipeValue<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>>;
5934
5937
  /**
5935
5938
  * Attempt to pipe a result through a series of functions
5936
5939
  *
@@ -5939,84 +5942,84 @@ export declare function attemptAsyncPipe<Initial, First, Second, Third, Fourth,
5939
5942
  * @param initial Initial result
5940
5943
  * @returns _Piped_ result
5941
5944
  */
5942
- export declare function attemptAsyncPipe<Initial>(initial: GenericCallback | Initial | Promise<Initial> | Result<Initial>, first?: (value: UnwrapValue<Initial>) => unknown, ...seconds: Array<(value: unknown) => unknown>): Promise<WrapValue<Initial>>;
5945
+ export declare function attemptAsyncPipe<Initial>(initial: InitialAsyncPipeValue<Initial>, first?: (value: UnwrapValue<Initial>) => unknown, ...seconds: Array<(value: unknown) => unknown>): Promise<WrapValue<Initial>>;
5943
5946
  /**
5944
5947
  * Attempt to pipe a value through a function
5945
5948
  *
5946
5949
  * @param initial Initial value
5947
5950
  * @returns _Piped_ result
5948
5951
  */
5949
- export declare function attemptPipe<Initial, Pipe>(initial: GenericCallback | Initial | Result<Initial>, pipe: (value: UnwrapValue<Initial>) => Pipe): WrapValue<Pipe>;
5952
+ export declare function attemptPipe<Initial, Pipe>(initial: InitialPipeValue<Initial>, pipe: (value: UnwrapValue<Initial>) => Pipe): WrapValue<Pipe>;
5950
5953
  /**
5951
5954
  * Attempt to pipe a value through a series of functions
5952
5955
  *
5953
5956
  * @param initial Initial value
5954
5957
  * @returns _Piped_ result
5955
5958
  */
5956
- export declare function attemptPipe<Initial, First, Second>(initial: GenericCallback | Initial | Result<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second): WrapValue<Second>;
5959
+ export declare function attemptPipe<Initial, First, Second>(initial: InitialPipeValue<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second): WrapValue<Second>;
5957
5960
  /**
5958
5961
  * Attempt to pipe a value through a series of functions
5959
5962
  *
5960
5963
  * @param initial Initial value
5961
5964
  * @returns _Piped_ result
5962
5965
  */
5963
- export 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>;
5966
+ export declare function attemptPipe<Initial, First, Second, Third>(initial: InitialPipeValue<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third): WrapValue<Third>;
5964
5967
  /**
5965
5968
  * Attempt to pipe a value through a series of functions
5966
5969
  *
5967
5970
  * @param initial Initial value
5968
5971
  * @returns _Piped_ result
5969
5972
  */
5970
- export 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>;
5973
+ export declare function attemptPipe<Initial, First, Second, Third, Fourth>(initial: InitialPipeValue<Initial>, first: (value: UnwrapValue<Initial>) => First, second: (value: UnwrapValue<First>) => Second, third: (value: UnwrapValue<Second>) => Third, fourth: (value: UnwrapValue<Third>) => Fourth): WrapValue<Fourth>;
5971
5974
  /**
5972
5975
  * Attempt to pipe a value through a series of functions
5973
5976
  *
5974
5977
  * @param initial Initial value
5975
5978
  * @returns _Piped_ result
5976
5979
  */
5977
- export 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>;
5980
+ export declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth>(initial: InitialPipeValue<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>;
5978
5981
  /**
5979
5982
  * Attempt to pipe a value through a series of functions
5980
5983
  *
5981
5984
  * @param initial Initial value
5982
5985
  * @returns _Piped_ result
5983
5986
  */
5984
- export 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>;
5987
+ export declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth>(initial: InitialPipeValue<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>;
5985
5988
  /**
5986
5989
  * Attempt to pipe a value through a series of functions
5987
5990
  *
5988
5991
  * @param initial Initial value
5989
5992
  * @returns _Piped_ result
5990
5993
  */
5991
- export 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>;
5994
+ export declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh>(initial: InitialPipeValue<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>;
5992
5995
  /**
5993
5996
  * Attempt to pipe a value through a series of functions
5994
5997
  *
5995
5998
  * @param initial Initial value
5996
5999
  * @returns _Piped_ result
5997
6000
  */
5998
- export 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>;
6001
+ export declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(initial: InitialPipeValue<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>;
5999
6002
  /**
6000
6003
  * Attempt to pipe a value through a series of functions
6001
6004
  *
6002
6005
  * @param initial Initial value
6003
6006
  * @returns _Piped_ result
6004
6007
  */
6005
- export 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>;
6008
+ export declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth>(initial: InitialPipeValue<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>;
6006
6009
  /**
6007
6010
  * Attempt to pipe a value through a series of functions
6008
6011
  *
6009
6012
  * @param initial Initial value
6010
6013
  * @returns _Piped_ result
6011
6014
  */
6012
- export 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>;
6015
+ export declare function attemptPipe<Initial, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth>(initial: InitialPipeValue<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>;
6013
6016
  /**
6014
6017
  * Attempt to pipe a result through a series of functions
6015
6018
  *
6016
6019
  * @param initial Initial result
6017
6020
  * @returns _Piped_ result
6018
6021
  */
6019
- export declare function attemptPipe<Initial>(initial: GenericCallback | Initial | Result<Initial>, first?: (value: UnwrapValue<Initial>) => unknown, ...seconds: Array<(value: unknown) => unknown>): WrapValue<Initial>;
6022
+ export declare function attemptPipe<Initial>(initial: InitialPipeValue<Initial>, first?: (value: UnwrapValue<Initial>) => unknown, ...seconds: Array<(value: unknown) => unknown>): WrapValue<Initial>;
6020
6023
  export declare namespace attemptPipe {
6021
6024
  export var async: typeof attemptAsyncPipe;
6022
6025
  }
@@ -6761,7 +6764,7 @@ export declare function unsmush<Value extends PlainObject>(value: Value): Unsmus
6761
6764
  /**
6762
6765
  * Options for assigning values
6763
6766
  */
6764
- type AssignOptions = BaseOptions;
6767
+ type AssignOptions = { [Key in keyof BaseOptions]: BaseOptions[Key]; };
6765
6768
  type BaseOptions = {
6766
6769
  /**
6767
6770
  * Key _(or key epxressions)_ for values that should be replaced
@@ -8484,7 +8487,7 @@ export declare function sum(values: number[]): number;
8484
8487
  *
8485
8488
  * @param value Value to check
8486
8489
  * @param minimum Minimum value
8487
- * @param maximum Maximum value
8490
+ * @param maximum Maximum value _(inclusive)_
8488
8491
  * @returns `true` if the value is between the minimum and maximum, otherwise `false`
8489
8492
  */
8490
8493
  export declare function between(value: number, minimum: number, maximum: number): boolean;
@@ -8781,6 +8784,12 @@ export declare namespace queue {
8781
8784
  }
8782
8785
  //#endregion
8783
8786
  //#region src/internal/random.d.ts
8787
+ /**
8788
+ * Get a random number between 0 _(inclusive)_ and 1 _(exclusive)_
8789
+ *
8790
+ * @returns Random number
8791
+ */
8792
+ export declare function getRandom(): number;
8784
8793
  /**
8785
8794
  * Get a random floating-point number
8786
8795
  *