@ls-stack/utils 3.39.0 → 3.41.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 (162) hide show
  1. package/dist/arrayUtils.d.cts +70 -57
  2. package/dist/arrayUtils.d.ts +70 -57
  3. package/dist/assertions.d.cts +128 -117
  4. package/dist/assertions.d.ts +128 -117
  5. package/dist/asyncQueue.cjs +117 -112
  6. package/dist/asyncQueue.d.cts +217 -215
  7. package/dist/asyncQueue.d.ts +217 -215
  8. package/dist/asyncQueue.js +117 -112
  9. package/dist/awaitDebounce.d.cts +26 -23
  10. package/dist/awaitDebounce.d.ts +26 -23
  11. package/dist/cache.cjs +2 -1
  12. package/dist/cache.d.cts +15 -9
  13. package/dist/cache.d.ts +15 -9
  14. package/dist/cache.js +2 -1
  15. package/dist/{chunk-GHAQOUA6.js → chunk-23KPGKDT.js} +22 -1
  16. package/dist/{chunk-ADM37GSC.js → chunk-7L4KCZJJ.js} +12 -10
  17. package/dist/{chunk-KW55OTUG.js → chunk-B3KFV2MH.js} +2 -2
  18. package/dist/chunk-DTE2QMWE.js +48 -0
  19. package/dist/concurrentCalls.d.cts +8 -4
  20. package/dist/concurrentCalls.d.ts +8 -4
  21. package/dist/concurrentCalls.js +1 -1
  22. package/dist/consoleFmt.cjs +1 -0
  23. package/dist/consoleFmt.d.cts +6 -0
  24. package/dist/consoleFmt.d.ts +6 -0
  25. package/dist/consoleFmt.js +1 -0
  26. package/dist/debounce.d.cts +12 -20
  27. package/dist/debounce.d.ts +12 -20
  28. package/dist/dedent.d.cts +31 -31
  29. package/dist/dedent.d.ts +31 -31
  30. package/dist/deepEqual.d.cts +10 -9
  31. package/dist/deepEqual.d.ts +10 -9
  32. package/dist/filterObjectOrArrayKeys.d.cts +44 -19
  33. package/dist/filterObjectOrArrayKeys.d.ts +44 -19
  34. package/dist/getAutoIncrementId.d.cts +25 -23
  35. package/dist/getAutoIncrementId.d.ts +25 -23
  36. package/dist/getCompositeKey.d.cts +2 -1
  37. package/dist/getCompositeKey.d.ts +2 -1
  38. package/dist/getValueStableKey.d.cts +4 -3
  39. package/dist/getValueStableKey.d.ts +4 -3
  40. package/dist/mutationUtils.d.cts +2 -2
  41. package/dist/mutationUtils.d.ts +2 -2
  42. package/dist/objUtils.cjs +51 -2
  43. package/dist/objUtils.d.cts +8 -3
  44. package/dist/objUtils.d.ts +8 -3
  45. package/dist/objUtils.js +11 -3
  46. package/dist/parallelAsyncCalls.cjs +2 -1
  47. package/dist/parallelAsyncCalls.d.cts +5 -4
  48. package/dist/parallelAsyncCalls.d.ts +5 -4
  49. package/dist/parallelAsyncCalls.js +2 -1
  50. package/dist/retryOnError.d.cts +23 -20
  51. package/dist/retryOnError.d.ts +23 -20
  52. package/dist/runShellCmd.d.cts +40 -40
  53. package/dist/runShellCmd.d.ts +40 -40
  54. package/dist/safeJson.d.cts +6 -2
  55. package/dist/safeJson.d.ts +6 -2
  56. package/dist/saferTyping.d.cts +21 -14
  57. package/dist/saferTyping.d.ts +21 -14
  58. package/dist/shallowEqual.d.cts +1 -1
  59. package/dist/shallowEqual.d.ts +1 -1
  60. package/dist/stringUtils.cjs +2 -2
  61. package/dist/stringUtils.d.cts +6 -7
  62. package/dist/stringUtils.d.ts +6 -7
  63. package/dist/stringUtils.js +1 -1
  64. package/dist/testUtils.cjs +11 -9
  65. package/dist/testUtils.d.cts +32 -14
  66. package/dist/testUtils.d.ts +32 -14
  67. package/dist/testUtils.js +4 -3
  68. package/dist/throttle.d.cts +57 -48
  69. package/dist/throttle.d.ts +57 -48
  70. package/dist/timers.d.cts +68 -63
  71. package/dist/timers.d.ts +68 -63
  72. package/dist/tsResult.d.cts +7 -6
  73. package/dist/tsResult.d.ts +7 -6
  74. package/dist/typeGuards.d.cts +65 -64
  75. package/dist/typeGuards.d.ts +65 -64
  76. package/dist/typeUtils.d.cts +18 -4
  77. package/dist/typeUtils.d.ts +18 -4
  78. package/dist/typedStrings.d.cts +68 -57
  79. package/dist/typedStrings.d.ts +68 -57
  80. package/dist/typingFnUtils.d.cts +12 -6
  81. package/dist/typingFnUtils.d.ts +12 -6
  82. package/dist/typingFnUtils.js +12 -35
  83. package/dist/typingTestUtils.cjs +7 -1
  84. package/dist/typingTestUtils.d.cts +52 -11
  85. package/dist/typingTestUtils.d.ts +52 -11
  86. package/dist/typingTestUtils.js +7 -1
  87. package/dist/typingUtils.d.cts +4 -1
  88. package/dist/typingUtils.d.ts +4 -1
  89. package/dist/yamlStringify.cjs +11 -9
  90. package/dist/yamlStringify.js +2 -2
  91. package/package.json +6 -2
  92. package/docs/README.md +0 -72
  93. package/docs/_media/modules.md +0 -58
  94. package/docs/arrayUtils/-internal-.md +0 -179
  95. package/docs/arrayUtils/README.md +0 -550
  96. package/docs/assertions/-internal-.md +0 -63
  97. package/docs/assertions/README.md +0 -565
  98. package/docs/asyncQueue/-internal-.md +0 -297
  99. package/docs/asyncQueue/README.md +0 -1485
  100. package/docs/awaitDebounce.md +0 -66
  101. package/docs/cache/-internal-.md +0 -168
  102. package/docs/cache/README.md +0 -360
  103. package/docs/castValues.md +0 -47
  104. package/docs/concurrentCalls/-internal-.md +0 -490
  105. package/docs/concurrentCalls/README.md +0 -299
  106. package/docs/consoleFmt.md +0 -91
  107. package/docs/conversions.md +0 -27
  108. package/docs/createThrottleController/-internal-.md +0 -73
  109. package/docs/createThrottleController/README.md +0 -31
  110. package/docs/debounce.md +0 -188
  111. package/docs/dedent/-internal-.md +0 -17
  112. package/docs/dedent/README.md +0 -204
  113. package/docs/deepEqual.md +0 -94
  114. package/docs/enhancedMap.md +0 -358
  115. package/docs/exhaustiveMatch/-internal-.md +0 -39
  116. package/docs/exhaustiveMatch/README.md +0 -146
  117. package/docs/filterObjectOrArrayKeys.md +0 -109
  118. package/docs/getAutoIncrementId.md +0 -93
  119. package/docs/getCompositeKey.md +0 -39
  120. package/docs/getValueStableKey.md +0 -57
  121. package/docs/hash.md +0 -31
  122. package/docs/interpolate/-internal-.md +0 -61
  123. package/docs/interpolate/README.md +0 -62
  124. package/docs/keepPrevIfUnchanged.md +0 -43
  125. package/docs/levenshtein.md +0 -93
  126. package/docs/main.md +0 -21
  127. package/docs/mathUtils.md +0 -137
  128. package/docs/modules.md +0 -58
  129. package/docs/mutationUtils.md +0 -44
  130. package/docs/objUtils.md +0 -237
  131. package/docs/parallelAsyncCalls/-internal-.md +0 -347
  132. package/docs/parallelAsyncCalls/README.md +0 -45
  133. package/docs/promiseUtils/-internal-.md +0 -69
  134. package/docs/promiseUtils/README.md +0 -31
  135. package/docs/retryOnError/-internal-.md +0 -111
  136. package/docs/retryOnError/README.md +0 -168
  137. package/docs/runShellCmd/-internal-.md +0 -111
  138. package/docs/runShellCmd/README.md +0 -201
  139. package/docs/safeJson.md +0 -51
  140. package/docs/saferTyping.md +0 -228
  141. package/docs/serializeXML.md +0 -100
  142. package/docs/shallowEqual.md +0 -33
  143. package/docs/sleep.md +0 -27
  144. package/docs/stringUtils/-internal-.md +0 -17
  145. package/docs/stringUtils/README.md +0 -270
  146. package/docs/testUtils.md +0 -382
  147. package/docs/throttle/-internal-.md +0 -47
  148. package/docs/throttle/README.md +0 -178
  149. package/docs/time.md +0 -274
  150. package/docs/timers.md +0 -256
  151. package/docs/tsResult/-internal-.md +0 -327
  152. package/docs/tsResult/README.md +0 -702
  153. package/docs/typeGuards.md +0 -399
  154. package/docs/typeUtils/-internal-.md +0 -99
  155. package/docs/typeUtils/README.md +0 -195
  156. package/docs/typeUtils.typesTest.md +0 -7
  157. package/docs/typedStrings.md +0 -458
  158. package/docs/typingFnUtils/-internal-.md +0 -43
  159. package/docs/typingFnUtils/README.md +0 -317
  160. package/docs/typingTestUtils.md +0 -172
  161. package/docs/typingUtils.md +0 -135
  162. package/docs/yamlStringify.md +0 -83
@@ -1,297 +0,0 @@
1
- [**@ls-stack/utils**](../README.md)
2
-
3
- ***
4
-
5
- [@ls-stack/utils](../modules.md) / [asyncQueue](README.md) / \<internal\>
6
-
7
- # \<internal\>
8
-
9
- ## Type Aliases
10
-
11
- ### AddOptions\<I, T, E\>
12
-
13
- ```ts
14
- type AddOptions<I, T, E> = object;
15
- ```
16
-
17
- Defined in: [packages/utils/src/asyncQueue.ts:96](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L96)
18
-
19
- Options for adding individual tasks to the queue
20
-
21
- #### Type Parameters
22
-
23
- ##### I
24
-
25
- `I`
26
-
27
- ##### T
28
-
29
- `T`
30
-
31
- ##### E
32
-
33
- `E` *extends* `ResultValidErrors`
34
-
35
- #### Properties
36
-
37
- ##### meta?
38
-
39
- ```ts
40
- optional meta: I;
41
- ```
42
-
43
- Defined in: [packages/utils/src/asyncQueue.ts:102](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L102)
44
-
45
- Metadata to associate with this task
46
-
47
- ##### onComplete()?
48
-
49
- ```ts
50
- optional onComplete: (value) => void;
51
- ```
52
-
53
- Defined in: [packages/utils/src/asyncQueue.ts:104](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L104)
54
-
55
- Callback invoked when task completes successfully
56
-
57
- ###### Parameters
58
-
59
- ###### value
60
-
61
- `T`
62
-
63
- ###### Returns
64
-
65
- `void`
66
-
67
- ##### onError()?
68
-
69
- ```ts
70
- optional onError: (error) => void;
71
- ```
72
-
73
- Defined in: [packages/utils/src/asyncQueue.ts:106](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L106)
74
-
75
- Callback invoked when task fails
76
-
77
- ###### Parameters
78
-
79
- ###### error
80
-
81
- `E` | `Error`
82
-
83
- ###### Returns
84
-
85
- `void`
86
-
87
- ##### signal?
88
-
89
- ```ts
90
- optional signal: AbortSignal;
91
- ```
92
-
93
- Defined in: [packages/utils/src/asyncQueue.ts:98](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L98)
94
-
95
- AbortSignal to cancel this specific task
96
-
97
- ##### timeout?
98
-
99
- ```ts
100
- optional timeout: number;
101
- ```
102
-
103
- Defined in: [packages/utils/src/asyncQueue.ts:100](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L100)
104
-
105
- Timeout for this specific task in milliseconds
106
-
107
- ***
108
-
109
- ### AddOptionsWithId\<I, T, E\>
110
-
111
- ```ts
112
- type AddOptionsWithId<I, T, E> = Omit<AddOptions<I, T, E>, "meta"> & object;
113
- ```
114
-
115
- Defined in: [packages/utils/src/asyncQueue.ts:918](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L918)
116
-
117
- AddOptions variant that requires metadata to be provided
118
-
119
- #### Type declaration
120
-
121
- ##### meta
122
-
123
- ```ts
124
- meta: I;
125
- ```
126
-
127
- #### Type Parameters
128
-
129
- ##### I
130
-
131
- `I`
132
-
133
- ##### T
134
-
135
- `T`
136
-
137
- ##### E
138
-
139
- `E` *extends* `ResultValidErrors`
140
-
141
- ***
142
-
143
- ### AsyncQueueOptions
144
-
145
- ```ts
146
- type AsyncQueueOptions = object;
147
- ```
148
-
149
- Defined in: [packages/utils/src/asyncQueue.ts:76](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L76)
150
-
151
- Configuration options for AsyncQueue initialization
152
-
153
- #### Properties
154
-
155
- ##### autoStart?
156
-
157
- ```ts
158
- optional autoStart: boolean;
159
- ```
160
-
161
- Defined in: [packages/utils/src/asyncQueue.ts:88](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L88)
162
-
163
- Start processing tasks immediately when added (default: true)
164
-
165
- ##### concurrency?
166
-
167
- ```ts
168
- optional concurrency: number;
169
- ```
170
-
171
- Defined in: [packages/utils/src/asyncQueue.ts:78](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L78)
172
-
173
- Maximum number of tasks to run concurrently (default: 1)
174
-
175
- ##### rateLimit?
176
-
177
- ```ts
178
- optional rateLimit: RateLimit;
179
- ```
180
-
181
- Defined in: [packages/utils/src/asyncQueue.ts:90](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L90)
182
-
183
- Rate limit configuration to limit tasks per time interval
184
-
185
- ##### rejectPendingOnError?
186
-
187
- ```ts
188
- optional rejectPendingOnError: boolean;
189
- ```
190
-
191
- Defined in: [packages/utils/src/asyncQueue.ts:86](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L86)
192
-
193
- Reject all pending tasks when stopping on error (default: false)
194
-
195
- ##### signal?
196
-
197
- ```ts
198
- optional signal: AbortSignal;
199
- ```
200
-
201
- Defined in: [packages/utils/src/asyncQueue.ts:80](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L80)
202
-
203
- AbortSignal to cancel the entire queue
204
-
205
- ##### stopOnError?
206
-
207
- ```ts
208
- optional stopOnError: boolean;
209
- ```
210
-
211
- Defined in: [packages/utils/src/asyncQueue.ts:84](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L84)
212
-
213
- Stop processing new tasks when any task fails (default: false)
214
-
215
- ##### timeout?
216
-
217
- ```ts
218
- optional timeout: number;
219
- ```
220
-
221
- Defined in: [packages/utils/src/asyncQueue.ts:82](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L82)
222
-
223
- Default timeout for all tasks in milliseconds
224
-
225
- ***
226
-
227
- ### RateLimit
228
-
229
- ```ts
230
- type RateLimit = object;
231
- ```
232
-
233
- Defined in: [packages/utils/src/asyncQueue.ts:66](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L66)
234
-
235
- Configuration for rate limiting task execution
236
-
237
- #### Properties
238
-
239
- ##### interval
240
-
241
- ```ts
242
- interval: DurationObj | number;
243
- ```
244
-
245
- Defined in: [packages/utils/src/asyncQueue.ts:70](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L70)
246
-
247
- Time interval in milliseconds or as a duration object
248
-
249
- ##### maxTasks
250
-
251
- ```ts
252
- maxTasks: number;
253
- ```
254
-
255
- Defined in: [packages/utils/src/asyncQueue.ts:68](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L68)
256
-
257
- Maximum number of tasks to execute within the interval
258
-
259
- ***
260
-
261
- ### RunCtx\<I\>
262
-
263
- ```ts
264
- type RunCtx<I> = object;
265
- ```
266
-
267
- Defined in: [packages/utils/src/asyncQueue.ts:112](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L112)
268
-
269
- Runtime context passed to task functions
270
-
271
- #### Type Parameters
272
-
273
- ##### I
274
-
275
- `I`
276
-
277
- #### Properties
278
-
279
- ##### meta?
280
-
281
- ```ts
282
- optional meta: I;
283
- ```
284
-
285
- Defined in: [packages/utils/src/asyncQueue.ts:116](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L116)
286
-
287
- Metadata associated with this task
288
-
289
- ##### signal?
290
-
291
- ```ts
292
- optional signal: AbortSignal;
293
- ```
294
-
295
- Defined in: [packages/utils/src/asyncQueue.ts:114](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L114)
296
-
297
- Combined AbortSignal from task, queue, and timeout signals