@ls-stack/utils 3.17.1 → 3.19.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 (114) hide show
  1. package/README.md +1 -15
  2. package/docs/README.md +72 -0
  3. package/docs/_media/modules.md +52 -0
  4. package/docs/arrayUtils/-internal-.md +17 -0
  5. package/docs/arrayUtils/README.md +423 -0
  6. package/docs/assertions/-internal-.md +63 -0
  7. package/docs/assertions/README.md +565 -0
  8. package/docs/asyncQueue/-internal-.md +815 -0
  9. package/docs/asyncQueue/README.md +75 -0
  10. package/docs/awaitDebounce.md +66 -0
  11. package/docs/cache/-internal-.md +168 -0
  12. package/docs/cache/README.md +360 -0
  13. package/docs/castValues.md +47 -0
  14. package/docs/concurrentCalls/-internal-.md +416 -0
  15. package/docs/concurrentCalls/README.md +77 -0
  16. package/docs/consoleFmt.md +91 -0
  17. package/docs/conversions.md +27 -0
  18. package/docs/createThrottleController/-internal-.md +73 -0
  19. package/docs/createThrottleController/README.md +31 -0
  20. package/docs/debounce.md +188 -0
  21. package/docs/dedent.md +117 -0
  22. package/docs/deepEqual.md +94 -0
  23. package/docs/enhancedMap.md +358 -0
  24. package/docs/exhaustiveMatch/-internal-.md +39 -0
  25. package/docs/exhaustiveMatch/README.md +146 -0
  26. package/docs/getAutoIncrementId.md +93 -0
  27. package/docs/getCompositeKey.md +39 -0
  28. package/docs/getValueStableKey.md +57 -0
  29. package/docs/hash.md +31 -0
  30. package/docs/interpolate/-internal-.md +61 -0
  31. package/docs/interpolate/README.md +62 -0
  32. package/docs/levenshtein.md +93 -0
  33. package/docs/main.md +21 -0
  34. package/docs/mathUtils.md +137 -0
  35. package/docs/modules.md +52 -0
  36. package/docs/objUtils.md +237 -0
  37. package/docs/parallelAsyncCalls/-internal-.md +347 -0
  38. package/docs/parallelAsyncCalls/README.md +45 -0
  39. package/docs/promiseUtils/-internal-.md +69 -0
  40. package/docs/promiseUtils/README.md +31 -0
  41. package/docs/retryOnError.md +67 -0
  42. package/docs/runShellCmd/-internal-.md +111 -0
  43. package/docs/runShellCmd/README.md +201 -0
  44. package/docs/safeJson.md +51 -0
  45. package/docs/saferTyping.md +228 -0
  46. package/docs/serializeXML.md +100 -0
  47. package/docs/shallowEqual.md +33 -0
  48. package/docs/sleep.md +27 -0
  49. package/docs/stringUtils/-internal-.md +17 -0
  50. package/docs/stringUtils/README.md +166 -0
  51. package/docs/testUtils.md +315 -0
  52. package/docs/throttle/-internal-.md +47 -0
  53. package/docs/throttle/README.md +178 -0
  54. package/docs/time.md +274 -0
  55. package/docs/timers.md +256 -0
  56. package/docs/tsResult/-internal-.md +327 -0
  57. package/docs/tsResult/README.md +696 -0
  58. package/docs/typeGuards.md +399 -0
  59. package/docs/typingFnUtils/-internal-.md +27 -0
  60. package/docs/typingFnUtils/README.md +293 -0
  61. package/docs/typingTestUtils.md +172 -0
  62. package/docs/typingUtils.md +111 -0
  63. package/docs/yamlStringify.md +45 -0
  64. package/lib/arrayUtils.js +3 -3
  65. package/lib/assertions.js +2 -2
  66. package/lib/awaitDebounce.cjs +106 -0
  67. package/lib/awaitDebounce.d.cts +38 -0
  68. package/lib/awaitDebounce.d.ts +38 -0
  69. package/lib/awaitDebounce.js +28 -0
  70. package/lib/cache.js +2 -2
  71. package/lib/{chunk-NH2LCAQS.js → chunk-6FIBVC2P.js} +1 -1
  72. package/lib/{chunk-GKOTKAIV.js → chunk-7CQPOM5I.js} +1 -1
  73. package/lib/{chunk-WS4WEVHU.js → chunk-C2SVCIWE.js} +1 -1
  74. package/lib/{chunk-SSKW673U.js → chunk-JF2MDHOJ.js} +5 -1
  75. package/lib/chunk-NW5H5EW7.js +100 -0
  76. package/lib/{chunk-DMW5Q4T2.js → chunk-SRVMMYSW.js} +1 -1
  77. package/lib/concurrentCalls.js +3 -3
  78. package/lib/createThrottleController.js +3 -3
  79. package/lib/debounce.js +4 -95
  80. package/lib/enhancedMap.js +3 -3
  81. package/lib/getAutoIncrementId.cjs +44 -0
  82. package/lib/getAutoIncrementId.d.cts +44 -0
  83. package/lib/getAutoIncrementId.d.ts +44 -0
  84. package/lib/getAutoIncrementId.js +18 -0
  85. package/lib/getCompositeKey.js +3 -3
  86. package/lib/getValueStableKey.js +3 -3
  87. package/lib/interpolate.js +2 -2
  88. package/lib/parallelAsyncCalls.js +2 -2
  89. package/lib/runShellCmd.d.cts +50 -0
  90. package/lib/runShellCmd.d.ts +50 -0
  91. package/lib/serializeXML.cjs +7 -2
  92. package/lib/serializeXML.d.cts +1 -1
  93. package/lib/serializeXML.d.ts +1 -1
  94. package/lib/serializeXML.js +7 -5
  95. package/lib/testUtils.js +3 -3
  96. package/lib/throttle.cjs +250 -0
  97. package/lib/throttle.d.cts +89 -0
  98. package/lib/throttle.d.ts +89 -0
  99. package/lib/throttle.js +38 -0
  100. package/lib/timers.cjs +93 -0
  101. package/lib/timers.d.cts +110 -0
  102. package/lib/timers.d.ts +110 -0
  103. package/lib/timers.js +65 -0
  104. package/lib/tsResult.js +2 -2
  105. package/lib/typeGuards.cjs +7 -2
  106. package/lib/typeGuards.d.cts +2 -1
  107. package/lib/typeGuards.d.ts +2 -1
  108. package/lib/typeGuards.js +5 -3
  109. package/lib/typingFnUtils.cjs +5 -1
  110. package/lib/typingFnUtils.d.cts +1 -1
  111. package/lib/typingFnUtils.d.ts +1 -1
  112. package/lib/typingFnUtils.js +5 -1
  113. package/lib/yamlStringify.js +5 -5
  114. package/package.json +26 -12
@@ -0,0 +1,416 @@
1
+ [**@ls-stack/utils**](../README.md)
2
+
3
+ ***
4
+
5
+ [@ls-stack/utils](../modules.md) / [concurrentCalls](README.md) / \<internal\>
6
+
7
+ # \<internal\>
8
+
9
+ ## Classes
10
+
11
+ ### ConcurrentCalls\<R, E\>
12
+
13
+ Defined in: [packages/utils/src/concurrentCalls.ts:32](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L32)
14
+
15
+ #### Type Parameters
16
+
17
+ ##### R
18
+
19
+ `R` = `unknown`
20
+
21
+ ##### E
22
+
23
+ `E` *extends* `Error` = `Error`
24
+
25
+ #### Constructors
26
+
27
+ ##### Constructor
28
+
29
+ ```ts
30
+ new ConcurrentCalls<R, E>(): ConcurrentCalls<R, E>;
31
+ ```
32
+
33
+ ###### Returns
34
+
35
+ [`ConcurrentCalls`](#concurrentcalls)\<`R`, `E`\>
36
+
37
+ #### Methods
38
+
39
+ ##### add()
40
+
41
+ ```ts
42
+ add(...calls): this;
43
+ ```
44
+
45
+ Defined in: [packages/utils/src/concurrentCalls.ts:36](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L36)
46
+
47
+ ###### Parameters
48
+
49
+ ###### calls
50
+
51
+ ...[`Action`](#action)\<`R`, `E`\>[]
52
+
53
+ ###### Returns
54
+
55
+ `this`
56
+
57
+ ##### resultifyAdd()
58
+
59
+ ```ts
60
+ resultifyAdd(...calls): this;
61
+ ```
62
+
63
+ Defined in: [packages/utils/src/concurrentCalls.ts:42](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L42)
64
+
65
+ ###### Parameters
66
+
67
+ ###### calls
68
+
69
+ ...(`Promise`\<`R`\> \| () => `R` \| () => `Promise`\<`R`\>)[]
70
+
71
+ ###### Returns
72
+
73
+ `this`
74
+
75
+ ##### runAll()
76
+
77
+ ```ts
78
+ runAll(__namedParameters): Promise<Result<R[], E>>;
79
+ ```
80
+
81
+ Defined in: [packages/utils/src/concurrentCalls.ts:74](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L74)
82
+
83
+ ###### Parameters
84
+
85
+ ###### \_\_namedParameters
86
+
87
+ [`RunProps`](#runprops) = `{}`
88
+
89
+ ###### Returns
90
+
91
+ `Promise`\<`Result`\<`R`[], `E`\>\>
92
+
93
+ ##### runAllSettled()
94
+
95
+ ```ts
96
+ runAllSettled(__namedParameters): Promise<{
97
+ aggregatedError: null | AggregateError;
98
+ allFailed: boolean;
99
+ failures: E[];
100
+ succeeded: R[];
101
+ total: number;
102
+ }>;
103
+ ```
104
+
105
+ Defined in: [packages/utils/src/concurrentCalls.ts:112](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L112)
106
+
107
+ ###### Parameters
108
+
109
+ ###### \_\_namedParameters
110
+
111
+ [`RunProps`](#runprops) = `{}`
112
+
113
+ ###### Returns
114
+
115
+ `Promise`\<\{
116
+ `aggregatedError`: `null` \| `AggregateError`;
117
+ `allFailed`: `boolean`;
118
+ `failures`: `E`[];
119
+ `succeeded`: `R`[];
120
+ `total`: `number`;
121
+ \}\>
122
+
123
+ ***
124
+
125
+ ### ConcurrentCallsWithMetadata\<M, R, E\>
126
+
127
+ Defined in: [packages/utils/src/concurrentCalls.ts:184](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L184)
128
+
129
+ #### Type Parameters
130
+
131
+ ##### M
132
+
133
+ `M` *extends* [`ValidMetadata`](#validmetadata)
134
+
135
+ ##### R
136
+
137
+ `R` = `unknown`
138
+
139
+ ##### E
140
+
141
+ `E` *extends* `Error` = `Error`
142
+
143
+ #### Constructors
144
+
145
+ ##### Constructor
146
+
147
+ ```ts
148
+ new ConcurrentCallsWithMetadata<M, R, E>(): ConcurrentCallsWithMetadata<M, R, E>;
149
+ ```
150
+
151
+ ###### Returns
152
+
153
+ [`ConcurrentCallsWithMetadata`](#concurrentcallswithmetadata)\<`M`, `R`, `E`\>
154
+
155
+ #### Methods
156
+
157
+ ##### add()
158
+
159
+ ```ts
160
+ add(...calls): this;
161
+ ```
162
+
163
+ Defined in: [packages/utils/src/concurrentCalls.ts:192](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L192)
164
+
165
+ ###### Parameters
166
+
167
+ ###### calls
168
+
169
+ ...`object`[]
170
+
171
+ ###### Returns
172
+
173
+ `this`
174
+
175
+ ##### resultifyAdd()
176
+
177
+ ```ts
178
+ resultifyAdd(...items): this;
179
+ ```
180
+
181
+ Defined in: [packages/utils/src/concurrentCalls.ts:206](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L206)
182
+
183
+ ###### Parameters
184
+
185
+ ###### items
186
+
187
+ ...`object`[]
188
+
189
+ ###### Returns
190
+
191
+ `this`
192
+
193
+ ##### runAll()
194
+
195
+ ```ts
196
+ runAll(__namedParameters): Promise<Result<SucceededCall<R, M>[], FailedCall<M, E>>>;
197
+ ```
198
+
199
+ Defined in: [packages/utils/src/concurrentCalls.ts:227](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L227)
200
+
201
+ ###### Parameters
202
+
203
+ ###### \_\_namedParameters
204
+
205
+ [`RunProps`](#runprops) = `{}`
206
+
207
+ ###### Returns
208
+
209
+ `Promise`\<`Result`\<[`SucceededCall`](#succeededcall)\<`R`, `M`\>[], [`FailedCall`](#failedcall)\<`M`, `E`\>\>\>
210
+
211
+ ##### runAllSettled()
212
+
213
+ ```ts
214
+ runAllSettled(__namedParameters): Promise<{
215
+ aggregatedError: null | AggregateError;
216
+ allFailed: boolean;
217
+ failed: FailedCall<M, E>[];
218
+ failures: FailedCall<M, E>[];
219
+ results: SettledResultWithMetadata<R, M, E>[];
220
+ succeeded: SucceededCall<R, M>[];
221
+ total: number;
222
+ }>;
223
+ ```
224
+
225
+ Defined in: [packages/utils/src/concurrentCalls.ts:274](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L274)
226
+
227
+ ###### Parameters
228
+
229
+ ###### \_\_namedParameters
230
+
231
+ [`RunProps`](#runprops) = `{}`
232
+
233
+ ###### Returns
234
+
235
+ `Promise`\<\{
236
+ `aggregatedError`: `null` \| `AggregateError`;
237
+ `allFailed`: `boolean`;
238
+ `failed`: [`FailedCall`](#failedcall)\<`M`, `E`\>[];
239
+ `failures`: [`FailedCall`](#failedcall)\<`M`, `E`\>[];
240
+ `results`: [`SettledResultWithMetadata`](#settledresultwithmetadata)\<`R`, `M`, `E`\>[];
241
+ `succeeded`: [`SucceededCall`](#succeededcall)\<`R`, `M`\>[];
242
+ `total`: `number`;
243
+ \}\>
244
+
245
+ ## Type Aliases
246
+
247
+ ### Action\<R, E\>
248
+
249
+ ```ts
250
+ type Action<R, E> =
251
+ | () => Promise<Result<R, E>>
252
+ | Promise<Result<R, E>>;
253
+ ```
254
+
255
+ Defined in: [packages/utils/src/concurrentCalls.ts:23](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L23)
256
+
257
+ #### Type Parameters
258
+
259
+ ##### R
260
+
261
+ `R`
262
+
263
+ ##### E
264
+
265
+ `E` *extends* `Error`
266
+
267
+ ***
268
+
269
+ ### FailedCall\<M, E\>
270
+
271
+ ```ts
272
+ type FailedCall<M, E> = object;
273
+ ```
274
+
275
+ Defined in: [packages/utils/src/concurrentCalls.ts:18](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L18)
276
+
277
+ #### Type Parameters
278
+
279
+ ##### M
280
+
281
+ `M`
282
+
283
+ ##### E
284
+
285
+ `E` *extends* `Error` = `Error`
286
+
287
+ #### Properties
288
+
289
+ ##### error
290
+
291
+ ```ts
292
+ error: E;
293
+ ```
294
+
295
+ Defined in: [packages/utils/src/concurrentCalls.ts:20](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L20)
296
+
297
+ ##### metadata
298
+
299
+ ```ts
300
+ metadata: M;
301
+ ```
302
+
303
+ Defined in: [packages/utils/src/concurrentCalls.ts:19](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L19)
304
+
305
+ ***
306
+
307
+ ### RunProps
308
+
309
+ ```ts
310
+ type RunProps = object;
311
+ ```
312
+
313
+ Defined in: [packages/utils/src/concurrentCalls.ts:9](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L9)
314
+
315
+ #### Properties
316
+
317
+ ##### delayStart()?
318
+
319
+ ```ts
320
+ optional delayStart: (index) => number;
321
+ ```
322
+
323
+ Defined in: [packages/utils/src/concurrentCalls.ts:10](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L10)
324
+
325
+ ###### Parameters
326
+
327
+ ###### index
328
+
329
+ `number`
330
+
331
+ ###### Returns
332
+
333
+ `number`
334
+
335
+ ***
336
+
337
+ ### SettledResultWithMetadata\<R, M, E\>
338
+
339
+ ```ts
340
+ type SettledResultWithMetadata<R, M, E> =
341
+ | {
342
+ error: false;
343
+ metadata: M;
344
+ ok: true;
345
+ value: R;
346
+ }
347
+ | {
348
+ error: E;
349
+ metadata: M;
350
+ ok: false;
351
+ };
352
+ ```
353
+
354
+ Defined in: [packages/utils/src/concurrentCalls.ts:28](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L28)
355
+
356
+ #### Type Parameters
357
+
358
+ ##### R
359
+
360
+ `R`
361
+
362
+ ##### M
363
+
364
+ `M`
365
+
366
+ ##### E
367
+
368
+ `E` *extends* `Error` = `Error`
369
+
370
+ ***
371
+
372
+ ### SucceededCall\<R, M\>
373
+
374
+ ```ts
375
+ type SucceededCall<R, M> = object;
376
+ ```
377
+
378
+ Defined in: [packages/utils/src/concurrentCalls.ts:14](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L14)
379
+
380
+ #### Type Parameters
381
+
382
+ ##### R
383
+
384
+ `R`
385
+
386
+ ##### M
387
+
388
+ `M`
389
+
390
+ #### Properties
391
+
392
+ ##### metadata
393
+
394
+ ```ts
395
+ metadata: M;
396
+ ```
397
+
398
+ Defined in: [packages/utils/src/concurrentCalls.ts:16](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L16)
399
+
400
+ ##### value
401
+
402
+ ```ts
403
+ value: R;
404
+ ```
405
+
406
+ Defined in: [packages/utils/src/concurrentCalls.ts:15](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L15)
407
+
408
+ ***
409
+
410
+ ### ValidMetadata
411
+
412
+ ```ts
413
+ type ValidMetadata = string | number | boolean | Record<string, unknown>;
414
+ ```
415
+
416
+ Defined in: [packages/utils/src/concurrentCalls.ts:7](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L7)
@@ -0,0 +1,77 @@
1
+ [**@ls-stack/utils**](../README.md)
2
+
3
+ ***
4
+
5
+ [@ls-stack/utils](../modules.md) / concurrentCalls
6
+
7
+ # concurrentCalls
8
+
9
+ ## Modules
10
+
11
+ - [\<internal\>](-internal-.md)
12
+
13
+ ## Functions
14
+
15
+ ### concurrentCalls()
16
+
17
+ ```ts
18
+ function concurrentCalls<R, E>(): ConcurrentCalls<R, E>;
19
+ ```
20
+
21
+ Defined in: [packages/utils/src/concurrentCalls.ts:180](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L180)
22
+
23
+ Executes multiple asynchronous calls concurrently and collects the results in a easier to use format.
24
+
25
+ #### Type Parameters
26
+
27
+ ##### R
28
+
29
+ `R` = `unknown`
30
+
31
+ The type of the result value.
32
+
33
+ ##### E
34
+
35
+ `E` *extends* `Error` = `Error`
36
+
37
+ The type of the error.
38
+
39
+ #### Returns
40
+
41
+ [`ConcurrentCalls`](-internal-.md#concurrentcalls)\<`R`, `E`\>
42
+
43
+ ***
44
+
45
+ ### concurrentCallsWithMetadata()
46
+
47
+ ```ts
48
+ function concurrentCallsWithMetadata<M, R, E>(): ConcurrentCallsWithMetadata<M, R, E>;
49
+ ```
50
+
51
+ Defined in: [packages/utils/src/concurrentCalls.ts:373](https://github.com/lucasols/utils/blob/main/packages/utils/src/concurrentCalls.ts#L373)
52
+
53
+ Executes multiple asynchronous calls concurrently and collects the results in a easier to use format.
54
+
55
+ #### Type Parameters
56
+
57
+ ##### M
58
+
59
+ `M` *extends* [`ValidMetadata`](-internal-.md#validmetadata)
60
+
61
+ The type of the call metadata.
62
+
63
+ ##### R
64
+
65
+ `R` = `unknown`
66
+
67
+ The type of the result value.
68
+
69
+ ##### E
70
+
71
+ `E` *extends* `Error` = `Error`
72
+
73
+ The type of the error from individual Result objects.
74
+
75
+ #### Returns
76
+
77
+ [`ConcurrentCallsWithMetadata`](-internal-.md#concurrentcallswithmetadata)\<`M`, `R`, `E`\>
@@ -0,0 +1,91 @@
1
+ [**@ls-stack/utils**](README.md)
2
+
3
+ ***
4
+
5
+ [@ls-stack/utils](modules.md) / consoleFmt
6
+
7
+ # consoleFmt
8
+
9
+ ## Variables
10
+
11
+ ### consoleFmt
12
+
13
+ ```ts
14
+ const consoleFmt: object;
15
+ ```
16
+
17
+ Defined in: [packages/utils/src/consoleFmt.ts:56](https://github.com/lucasols/utils/blob/main/packages/utils/src/consoleFmt.ts#L56)
18
+
19
+ #### Type declaration
20
+
21
+ ##### bgColor()
22
+
23
+ ```ts
24
+ bgColor: (color, text) => string;
25
+ ```
26
+
27
+ ###### Parameters
28
+
29
+ ###### color
30
+
31
+ `"green"` | `"red"` | `"blue"` | `"yellow"` | `"magenta"` | `"cyan"` | `"white"` | `"black"` | `"gray"` | `"brightRed"` | `"brightGreen"` | `"brightYellow"` | `"brightBlue"` | `"brightMagenta"` | `"brightCyan"` | `"brightWhite"`
32
+
33
+ ###### text
34
+
35
+ `string`
36
+
37
+ ###### Returns
38
+
39
+ `string`
40
+
41
+ ##### bold()
42
+
43
+ ```ts
44
+ bold: (text) => string;
45
+ ```
46
+
47
+ ###### Parameters
48
+
49
+ ###### text
50
+
51
+ `string`
52
+
53
+ ###### Returns
54
+
55
+ `string`
56
+
57
+ ##### color()
58
+
59
+ ```ts
60
+ color: (color, text) => string = consoleColors;
61
+ ```
62
+
63
+ ###### Parameters
64
+
65
+ ###### color
66
+
67
+ `"green"` | `"red"` | `"blue"` | `"yellow"` | `"magenta"` | `"cyan"` | `"white"` | `"black"` | `"gray"` | `"brightRed"` | `"brightGreen"` | `"brightYellow"` | `"brightBlue"` | `"brightMagenta"` | `"brightCyan"` | `"brightWhite"`
68
+
69
+ ###### text
70
+
71
+ `string`
72
+
73
+ ###### Returns
74
+
75
+ `string`
76
+
77
+ ##### underline()
78
+
79
+ ```ts
80
+ underline: (text) => string;
81
+ ```
82
+
83
+ ###### Parameters
84
+
85
+ ###### text
86
+
87
+ `string`
88
+
89
+ ###### Returns
90
+
91
+ `string`
@@ -0,0 +1,27 @@
1
+ [**@ls-stack/utils**](README.md)
2
+
3
+ ***
4
+
5
+ [@ls-stack/utils](modules.md) / conversions
6
+
7
+ # conversions
8
+
9
+ ## Functions
10
+
11
+ ### bytesToHumanReadable()
12
+
13
+ ```ts
14
+ function bytesToHumanReadable(bytes): string;
15
+ ```
16
+
17
+ Defined in: [packages/utils/src/conversions.ts:1](https://github.com/lucasols/utils/blob/main/packages/utils/src/conversions.ts#L1)
18
+
19
+ #### Parameters
20
+
21
+ ##### bytes
22
+
23
+ `number`
24
+
25
+ #### Returns
26
+
27
+ `string`
@@ -0,0 +1,73 @@
1
+ [**@ls-stack/utils**](../README.md)
2
+
3
+ ***
4
+
5
+ [@ls-stack/utils](../modules.md) / [createThrottleController](README.md) / \<internal\>
6
+
7
+ # \<internal\>
8
+
9
+ ## Type Aliases
10
+
11
+ ### Options
12
+
13
+ ```ts
14
+ type Options = object;
15
+ ```
16
+
17
+ Defined in: [packages/utils/src/createThrottleController.ts:5](https://github.com/lucasols/utils/blob/main/packages/utils/src/createThrottleController.ts#L5)
18
+
19
+ #### Properties
20
+
21
+ ##### cleanupCheckSecsInterval?
22
+
23
+ ```ts
24
+ optional cleanupCheckSecsInterval: number;
25
+ ```
26
+
27
+ Defined in: [packages/utils/src/createThrottleController.ts:8](https://github.com/lucasols/utils/blob/main/packages/utils/src/createThrottleController.ts#L8)
28
+
29
+ ##### maxCalls
30
+
31
+ ```ts
32
+ maxCalls: number;
33
+ ```
34
+
35
+ Defined in: [packages/utils/src/createThrottleController.ts:6](https://github.com/lucasols/utils/blob/main/packages/utils/src/createThrottleController.ts#L6)
36
+
37
+ ##### per
38
+
39
+ ```ts
40
+ per: DurationObj;
41
+ ```
42
+
43
+ Defined in: [packages/utils/src/createThrottleController.ts:7](https://github.com/lucasols/utils/blob/main/packages/utils/src/createThrottleController.ts#L7)
44
+
45
+ ***
46
+
47
+ ### ThrottleController
48
+
49
+ ```ts
50
+ type ThrottleController = object;
51
+ ```
52
+
53
+ Defined in: [packages/utils/src/createThrottleController.ts:11](https://github.com/lucasols/utils/blob/main/packages/utils/src/createThrottleController.ts#L11)
54
+
55
+ #### Properties
56
+
57
+ ##### shouldSkip()
58
+
59
+ ```ts
60
+ shouldSkip: (callId?) => boolean;
61
+ ```
62
+
63
+ Defined in: [packages/utils/src/createThrottleController.ts:12](https://github.com/lucasols/utils/blob/main/packages/utils/src/createThrottleController.ts#L12)
64
+
65
+ ###### Parameters
66
+
67
+ ###### callId?
68
+
69
+ `string` | `number` | (`string` \| `number`)[]
70
+
71
+ ###### Returns
72
+
73
+ `boolean`
@@ -0,0 +1,31 @@
1
+ [**@ls-stack/utils**](../README.md)
2
+
3
+ ***
4
+
5
+ [@ls-stack/utils](../modules.md) / createThrottleController
6
+
7
+ # createThrottleController
8
+
9
+ ## Modules
10
+
11
+ - [\<internal\>](-internal-.md)
12
+
13
+ ## Functions
14
+
15
+ ### createThrottleController()
16
+
17
+ ```ts
18
+ function createThrottleController(__namedParameters): ThrottleController;
19
+ ```
20
+
21
+ Defined in: [packages/utils/src/createThrottleController.ts:20](https://github.com/lucasols/utils/blob/main/packages/utils/src/createThrottleController.ts#L20)
22
+
23
+ #### Parameters
24
+
25
+ ##### \_\_namedParameters
26
+
27
+ [`Options`](-internal-.md#options)
28
+
29
+ #### Returns
30
+
31
+ [`ThrottleController`](-internal-.md#throttlecontroller)