@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,17 +0,0 @@
1
- [**@ls-stack/utils**](../README.md)
2
-
3
- ***
4
-
5
- [@ls-stack/utils](../modules.md) / [dedent](README.md) / \<internal\>
6
-
7
- # \<internal\>
8
-
9
- ## Type Aliases
10
-
11
- ### InterpolationValue
12
-
13
- ```ts
14
- type InterpolationValue = string | number | boolean | null | undefined;
15
- ```
16
-
17
- Defined in: [packages/utils/src/dedent.ts:30](https://github.com/lucasols/utils/blob/main/packages/utils/src/dedent.ts#L30)
@@ -1,204 +0,0 @@
1
- [**@ls-stack/utils**](../README.md)
2
-
3
- ***
4
-
5
- [@ls-stack/utils](../modules.md) / dedent
6
-
7
- # dedent
8
-
9
- ## Modules
10
-
11
- - [\<internal\>](-internal-.md)
12
-
13
- ## Interfaces
14
-
15
- ### Dedent()
16
-
17
- Defined in: [packages/utils/src/dedent.ts:35](https://github.com/lucasols/utils/blob/main/packages/utils/src/dedent.ts#L35)
18
-
19
- Dedent function interface that can be used both as a template tag and a regular function
20
-
21
- #### Call Signature
22
-
23
- ```ts
24
- Dedent(literals): string;
25
- ```
26
-
27
- Defined in: [packages/utils/src/dedent.ts:39](https://github.com/lucasols/utils/blob/main/packages/utils/src/dedent.ts#L39)
28
-
29
- Dedent function interface that can be used both as a template tag and a regular function
30
-
31
- ##### Parameters
32
-
33
- ###### literals
34
-
35
- `string`
36
-
37
- ##### Returns
38
-
39
- `string`
40
-
41
- #### Call Signature
42
-
43
- ```ts
44
- Dedent(strings, ...values): string;
45
- ```
46
-
47
- Defined in: [packages/utils/src/dedent.ts:43](https://github.com/lucasols/utils/blob/main/packages/utils/src/dedent.ts#L43)
48
-
49
- Dedent function interface that can be used both as a template tag and a regular function
50
-
51
- ##### Parameters
52
-
53
- ###### strings
54
-
55
- `TemplateStringsArray`
56
-
57
- ###### values
58
-
59
- ...[`InterpolationValue`](-internal-.md#interpolationvalue)[]
60
-
61
- ##### Returns
62
-
63
- `string`
64
-
65
- #### Properties
66
-
67
- ##### withOptions
68
-
69
- ```ts
70
- withOptions: CreateDedent;
71
- ```
72
-
73
- Defined in: [packages/utils/src/dedent.ts:47](https://github.com/lucasols/utils/blob/main/packages/utils/src/dedent.ts#L47)
74
-
75
- Create a new dedent function with custom options
76
-
77
- ***
78
-
79
- ### DedentOptions
80
-
81
- Defined in: [packages/utils/src/dedent.ts:4](https://github.com/lucasols/utils/blob/main/packages/utils/src/dedent.ts#L4)
82
-
83
- Configuration options for the dedent function behavior
84
-
85
- #### Properties
86
-
87
- ##### escapeSpecialCharacters?
88
-
89
- ```ts
90
- optional escapeSpecialCharacters: boolean;
91
- ```
92
-
93
- Defined in: [packages/utils/src/dedent.ts:10](https://github.com/lucasols/utils/blob/main/packages/utils/src/dedent.ts#L10)
94
-
95
- Whether to process escape sequences like \n, `, \$, and {
96
- When true, allows using escaped characters in template literals
97
-
98
- ###### Default
99
-
100
- ```ts
101
- true for template literals, false for plain strings
102
- ```
103
-
104
- ##### identInterpolations?
105
-
106
- ```ts
107
- optional identInterpolations: boolean;
108
- ```
109
-
110
- Defined in: [packages/utils/src/dedent.ts:21](https://github.com/lucasols/utils/blob/main/packages/utils/src/dedent.ts#L21)
111
-
112
- Whether to preserve relative indentation of interpolated multi-line values
113
- When true, multi-line interpolations are re-indented to match the surrounding context
114
-
115
- ###### Default
116
-
117
- ```ts
118
- true
119
- ```
120
-
121
- ##### showNullishOrFalseValues?
122
-
123
- ```ts
124
- optional showNullishOrFalseValues: boolean;
125
- ```
126
-
127
- Defined in: [packages/utils/src/dedent.ts:27](https://github.com/lucasols/utils/blob/main/packages/utils/src/dedent.ts#L27)
128
-
129
- Whether to display nullish or false values (false, null, undefined) in interpolations
130
- When false, nullish or false values are skipped entirely
131
-
132
- ###### Default
133
-
134
- ```ts
135
- false
136
- ```
137
-
138
- ##### trimWhitespace?
139
-
140
- ```ts
141
- optional trimWhitespace: boolean;
142
- ```
143
-
144
- Defined in: [packages/utils/src/dedent.ts:15](https://github.com/lucasols/utils/blob/main/packages/utils/src/dedent.ts#L15)
145
-
146
- Whether to trim leading and trailing whitespace from the final result
147
-
148
- ###### Default
149
-
150
- ```ts
151
- true
152
- ```
153
-
154
- ## Type Aliases
155
-
156
- ### CreateDedent()
157
-
158
- ```ts
159
- type CreateDedent = (options) => Dedent;
160
- ```
161
-
162
- Defined in: [packages/utils/src/dedent.ts:53](https://github.com/lucasols/utils/blob/main/packages/utils/src/dedent.ts#L53)
163
-
164
- Factory function type for creating dedent functions with custom options
165
-
166
- #### Parameters
167
-
168
- ##### options
169
-
170
- [`DedentOptions`](#dedentoptions)
171
-
172
- #### Returns
173
-
174
- [`Dedent`](#dedent)
175
-
176
- ## Variables
177
-
178
- ### dedent
179
-
180
- ```ts
181
- const dedent: Dedent;
182
- ```
183
-
184
- Defined in: [packages/utils/src/dedent.ts:75](https://github.com/lucasols/utils/blob/main/packages/utils/src/dedent.ts#L75)
185
-
186
- Remove common leading indentation from multi-line strings while preserving relative indentation.
187
- Can be used as a tagged template literal or called with a plain string.
188
-
189
- By default, it will dedent interpolated multi-line strings to match the surrounding context.
190
- And it will not show falsy values.
191
-
192
- #### Example
193
-
194
- ```typescript
195
- const text = dedent`
196
- function hello() {
197
- console.log('world');
198
- }
199
- `;
200
- // Result:
201
- "function hello() {
202
- console.log('world');
203
- }"
204
- ```
package/docs/deepEqual.md DELETED
@@ -1,94 +0,0 @@
1
- [**@ls-stack/utils**](README.md)
2
-
3
- ***
4
-
5
- [@ls-stack/utils](modules.md) / deepEqual
6
-
7
- # deepEqual
8
-
9
- ## Functions
10
-
11
- ### deepEqual()
12
-
13
- ```ts
14
- function deepEqual(
15
- foo,
16
- bar,
17
- maxDepth): boolean;
18
- ```
19
-
20
- Defined in: [packages/utils/src/deepEqual.ts:30](https://github.com/lucasols/utils/blob/main/packages/utils/src/deepEqual.ts#L30)
21
-
22
- Deep equality comparison between two values
23
-
24
- #### Parameters
25
-
26
- ##### foo
27
-
28
- `any`
29
-
30
- First value to compare
31
-
32
- ##### bar
33
-
34
- `any`
35
-
36
- Second value to compare
37
-
38
- ##### maxDepth
39
-
40
- `number` = `20`
41
-
42
- Maximum comparison depth (default: 20)
43
-
44
- #### Returns
45
-
46
- `boolean`
47
-
48
- True if values are deeply equal, false otherwise
49
-
50
- #### Example
51
-
52
- ```ts
53
- deepEqual({a: 1}, {a: 1}) // true
54
- deepEqual({a: 1}, {a: 2}) // false
55
- deepEqual([1, {b: 2}], [1, {b: 2}]) // true
56
- deepEqual(new Map([['a', 1]]), new Map([['a', 1]])) // true
57
- deepEqual(new Set([1, 2]), new Set([1, 2])) // true
58
- ```
59
-
60
- ***
61
-
62
- ### deepEqualWithMaxDepth()
63
-
64
- ```ts
65
- function deepEqualWithMaxDepth(maxDepth): (foo, bar) => boolean;
66
- ```
67
-
68
- Defined in: [packages/utils/src/deepEqual.ts:94](https://github.com/lucasols/utils/blob/main/packages/utils/src/deepEqual.ts#L94)
69
-
70
- #### Parameters
71
-
72
- ##### maxDepth
73
-
74
- `number`
75
-
76
- #### Returns
77
-
78
- ```ts
79
- (foo, bar): boolean;
80
- ```
81
-
82
- ##### Parameters
83
-
84
- ###### foo
85
-
86
- `any`
87
-
88
- ###### bar
89
-
90
- `any`
91
-
92
- ##### Returns
93
-
94
- `boolean`
@@ -1,358 +0,0 @@
1
- [**@ls-stack/utils**](README.md)
2
-
3
- ***
4
-
5
- [@ls-stack/utils](modules.md) / enhancedMap
6
-
7
- # enhancedMap
8
-
9
- ## Classes
10
-
11
- ### EnhancedMap\<K, V\>
12
-
13
- Defined in: [packages/utils/src/enhancedMap.ts:5](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L5)
14
-
15
- #### Extends
16
-
17
- - `Map`\<`K`, `V`\>
18
-
19
- #### Type Parameters
20
-
21
- ##### K
22
-
23
- `K`
24
-
25
- ##### V
26
-
27
- `V`
28
-
29
- #### Constructors
30
-
31
- ##### Constructor
32
-
33
- ```ts
34
- new EnhancedMap<K, V>(entries?): EnhancedMap<K, V>;
35
- ```
36
-
37
- Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.collection.d.ts:50
38
-
39
- ###### Parameters
40
-
41
- ###### entries?
42
-
43
- `null` | readonly readonly \[`K`, `V`\][]
44
-
45
- ###### Returns
46
-
47
- [`EnhancedMap`](#enhancedmap)\<`K`, `V`\>
48
-
49
- ###### Inherited from
50
-
51
- ```ts
52
- Map<K, V>.constructor
53
- ```
54
-
55
- ##### Constructor
56
-
57
- ```ts
58
- new EnhancedMap<K, V>(iterable?): EnhancedMap<K, V>;
59
- ```
60
-
61
- Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.collection.d.ts:49
62
-
63
- ###### Parameters
64
-
65
- ###### iterable?
66
-
67
- `null` | `Iterable`\<readonly \[`K`, `V`\], `any`, `any`\>
68
-
69
- ###### Returns
70
-
71
- [`EnhancedMap`](#enhancedmap)\<`K`, `V`\>
72
-
73
- ###### Inherited from
74
-
75
- ```ts
76
- Map<K, V>.constructor
77
- ```
78
-
79
- #### Methods
80
-
81
- ##### find()
82
-
83
- ```ts
84
- find(predicate):
85
- | undefined
86
- | {
87
- key: K;
88
- value: V;
89
- };
90
- ```
91
-
92
- Defined in: [packages/utils/src/enhancedMap.ts:6](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L6)
93
-
94
- ###### Parameters
95
-
96
- ###### predicate
97
-
98
- (`value`, `key`) => `boolean`
99
-
100
- ###### Returns
101
-
102
- \| `undefined`
103
- \| \{
104
- `key`: `K`;
105
- `value`: `V`;
106
- \}
107
-
108
- ##### getOrInsert()
109
-
110
- ```ts
111
- getOrInsert(key, fallback): V;
112
- ```
113
-
114
- Defined in: [packages/utils/src/enhancedMap.ts:44](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L44)
115
-
116
- ###### Parameters
117
-
118
- ###### key
119
-
120
- `K`
121
-
122
- ###### fallback
123
-
124
- () => `V`
125
-
126
- ###### Returns
127
-
128
- `V`
129
-
130
- ##### getOrThrow()
131
-
132
- ```ts
133
- getOrThrow(key): V;
134
- ```
135
-
136
- Defined in: [packages/utils/src/enhancedMap.ts:34](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L34)
137
-
138
- ###### Parameters
139
-
140
- ###### key
141
-
142
- `K`
143
-
144
- ###### Returns
145
-
146
- `V`
147
-
148
- ##### setMultiple()
149
-
150
- ###### Call Signature
151
-
152
- ```ts
153
- setMultiple(values): this;
154
- ```
155
-
156
- Defined in: [packages/utils/src/enhancedMap.ts:18](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L18)
157
-
158
- ###### Parameters
159
-
160
- ###### values
161
-
162
- `Record`\<`K` & `string`, `V`\>
163
-
164
- ###### Returns
165
-
166
- `this`
167
-
168
- ###### Call Signature
169
-
170
- ```ts
171
- setMultiple(...values): this;
172
- ```
173
-
174
- Defined in: [packages/utils/src/enhancedMap.ts:19](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L19)
175
-
176
- ###### Parameters
177
-
178
- ###### values
179
-
180
- ...\[`K`, `V`\][]
181
-
182
- ###### Returns
183
-
184
- `this`
185
-
186
- ##### toFilteredValues()
187
-
188
- ```ts
189
- toFilteredValues(predicate): V[];
190
- ```
191
-
192
- Defined in: [packages/utils/src/enhancedMap.ts:52](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L52)
193
-
194
- ###### Parameters
195
-
196
- ###### predicate
197
-
198
- (`value`, `key`) => `boolean`
199
-
200
- ###### Returns
201
-
202
- `V`[]
203
-
204
- ##### toKeys()
205
-
206
- ```ts
207
- toKeys(): K[];
208
- ```
209
-
210
- Defined in: [packages/utils/src/enhancedMap.ts:104](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L104)
211
-
212
- ###### Returns
213
-
214
- `K`[]
215
-
216
- ##### toMap()
217
-
218
- ```ts
219
- toMap<T>(mapFunction): T[];
220
- ```
221
-
222
- Defined in: [packages/utils/src/enhancedMap.ts:64](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L64)
223
-
224
- ###### Type Parameters
225
-
226
- ###### T
227
-
228
- `T`
229
-
230
- ###### Parameters
231
-
232
- ###### mapFunction
233
-
234
- (`value`, `key`, `reject`) => *typeof* [`enhancedMapReject`](#enhancedmapreject) \| `T`
235
-
236
- ###### Returns
237
-
238
- `T`[]
239
-
240
- ##### toObjMap()
241
-
242
- ```ts
243
- toObjMap<ObjKey, ObjValue>(mapFunction): Record<ObjKey, ObjValue>;
244
- ```
245
-
246
- Defined in: [packages/utils/src/enhancedMap.ts:84](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L84)
247
-
248
- ###### Type Parameters
249
-
250
- ###### ObjKey
251
-
252
- `ObjKey` *extends* `PropertyKey`
253
-
254
- ###### ObjValue
255
-
256
- `ObjValue`
257
-
258
- ###### Parameters
259
-
260
- ###### mapFunction
261
-
262
- (`value`, `key`) => `false` \| \[`ObjKey`, `ObjValue`\]
263
-
264
- ###### Returns
265
-
266
- `Record`\<`ObjKey`, `ObjValue`\>
267
-
268
- ##### toValues()
269
-
270
- ```ts
271
- toValues(): V[];
272
- ```
273
-
274
- Defined in: [packages/utils/src/enhancedMap.ts:100](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L100)
275
-
276
- ###### Returns
277
-
278
- `V`[]
279
-
280
- ##### from()
281
-
282
- ###### Call Signature
283
-
284
- ```ts
285
- static from<T, K>(array, key): EnhancedMap<T[K], T>;
286
- ```
287
-
288
- Defined in: [packages/utils/src/enhancedMap.ts:108](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L108)
289
-
290
- ###### Type Parameters
291
-
292
- ###### T
293
-
294
- `T` *extends* `Record`\<`string`, `unknown`\>
295
-
296
- ###### K
297
-
298
- `K` *extends* `string` \| `number` \| `symbol`
299
-
300
- ###### Parameters
301
-
302
- ###### array
303
-
304
- `undefined` | `null` | `Iterable`\<`T`, `any`, `any`\> | `T`[]
305
-
306
- ###### key
307
-
308
- `K`
309
-
310
- ###### Returns
311
-
312
- [`EnhancedMap`](#enhancedmap)\<`T`\[`K`\], `T`\>
313
-
314
- ###### Call Signature
315
-
316
- ```ts
317
- static from<T, K, V>(array, mapFunction): EnhancedMap<K, V>;
318
- ```
319
-
320
- Defined in: [packages/utils/src/enhancedMap.ts:112](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L112)
321
-
322
- ###### Type Parameters
323
-
324
- ###### T
325
-
326
- `T`
327
-
328
- ###### K
329
-
330
- `K`
331
-
332
- ###### V
333
-
334
- `V`
335
-
336
- ###### Parameters
337
-
338
- ###### array
339
-
340
- `undefined` | `null` | `T`[] | `Iterable`\<`T`, `any`, `any`\>
341
-
342
- ###### mapFunction
343
-
344
- (`item`) => `false` \| \[`K`, `V`\]
345
-
346
- ###### Returns
347
-
348
- [`EnhancedMap`](#enhancedmap)\<`K`, `V`\>
349
-
350
- ## Variables
351
-
352
- ### enhancedMapReject
353
-
354
- ```ts
355
- const enhancedMapReject: typeof enhancedMapReject;
356
- ```
357
-
358
- Defined in: [packages/utils/src/enhancedMap.ts:3](https://github.com/lucasols/utils/blob/main/packages/utils/src/enhancedMap.ts#L3)
@@ -1,39 +0,0 @@
1
- [**@ls-stack/utils**](../README.md)
2
-
3
- ***
4
-
5
- [@ls-stack/utils](../modules.md) / [exhaustiveMatch](README.md) / \<internal\>
6
-
7
- # \<internal\>
8
-
9
- ## Type Aliases
10
-
11
- ### Pattern\<R\>
12
-
13
- ```ts
14
- type Pattern<R> = { [K in T]: (() => R) | "_nxt" | "_never" };
15
- ```
16
-
17
- Defined in: [packages/utils/src/exhaustiveMatch.ts:2](https://github.com/lucasols/utils/blob/main/packages/utils/src/exhaustiveMatch.ts#L2)
18
-
19
- #### Type Parameters
20
-
21
- ##### R
22
-
23
- `R`
24
-
25
- ***
26
-
27
- ### Pattern\<R\>
28
-
29
- ```ts
30
- type Pattern<R> = { [P in K]: ((props: Extract<T, Record<D, P>>) => R) | "_never" };
31
- ```
32
-
33
- Defined in: [packages/utils/src/exhaustiveMatch.ts:56](https://github.com/lucasols/utils/blob/main/packages/utils/src/exhaustiveMatch.ts#L56)
34
-
35
- #### Type Parameters
36
-
37
- ##### R
38
-
39
- `R`