@twin.org/core 0.0.1-next.5 → 0.0.1-next.51
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.
- package/dist/cjs/index.cjs +1401 -736
- package/dist/esm/index.mjs +1398 -737
- package/dist/types/encoding/base58.d.ts +18 -0
- package/dist/types/factories/factory.d.ts +20 -1
- package/dist/types/helpers/envHelper.d.ts +16 -0
- package/dist/types/helpers/jsonHelper.d.ts +30 -0
- package/dist/types/helpers/objectHelper.d.ts +33 -0
- package/dist/types/helpers/uint8ArrayHelper.d.ts +11 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/models/IComponent.d.ts +12 -3
- package/dist/types/models/coerceType.d.ts +49 -0
- package/dist/types/models/compressionType.d.ts +1 -1
- package/dist/types/utils/asyncCache.d.ts +8 -0
- package/dist/types/utils/coerce.d.ts +22 -0
- package/dist/types/utils/converter.d.ts +12 -0
- package/dist/types/utils/guards.d.ts +16 -0
- package/dist/types/utils/is.d.ts +12 -0
- package/dist/types/utils/validation.d.ts +2 -0
- package/docs/changelog.md +15 -1
- package/docs/reference/classes/AlreadyExistsError.md +67 -25
- package/docs/reference/classes/ArrayHelper.md +6 -2
- package/docs/reference/classes/AsyncCache.md +56 -6
- package/docs/reference/classes/Base32.md +6 -2
- package/docs/reference/classes/Base58.md +61 -0
- package/docs/reference/classes/Base64.md +9 -3
- package/docs/reference/classes/Base64Url.md +6 -2
- package/docs/reference/classes/BaseError.md +65 -23
- package/docs/reference/classes/BitString.md +18 -6
- package/docs/reference/classes/Coerce.md +104 -8
- package/docs/reference/classes/Compression.md +16 -8
- package/docs/reference/classes/ConflictError.md +70 -26
- package/docs/reference/classes/Converter.md +104 -20
- package/docs/reference/classes/EnvHelper.md +43 -0
- package/docs/reference/classes/ErrorHelper.md +9 -3
- package/docs/reference/classes/Factory.md +78 -10
- package/docs/reference/classes/FilenameHelper.md +3 -1
- package/docs/reference/classes/GeneralError.md +65 -25
- package/docs/reference/classes/GuardError.md +70 -26
- package/docs/reference/classes/Guards.md +286 -74
- package/docs/reference/classes/HexHelper.md +15 -5
- package/docs/reference/classes/I18n.md +42 -16
- package/docs/reference/classes/Is.md +160 -44
- package/docs/reference/classes/JsonHelper.md +137 -5
- package/docs/reference/classes/NotFoundError.md +67 -25
- package/docs/reference/classes/NotImplementedError.md +61 -23
- package/docs/reference/classes/NotSupportedError.md +64 -24
- package/docs/reference/classes/ObjectHelper.md +188 -20
- package/docs/reference/classes/RandomHelper.md +3 -1
- package/docs/reference/classes/StringHelper.md +51 -17
- package/docs/reference/classes/Uint8ArrayHelper.md +35 -0
- package/docs/reference/classes/UnauthorizedError.md +64 -24
- package/docs/reference/classes/UnprocessableError.md +65 -25
- package/docs/reference/classes/Url.md +30 -10
- package/docs/reference/classes/Urn.md +54 -18
- package/docs/reference/classes/Validation.md +315 -109
- package/docs/reference/classes/ValidationError.md +64 -24
- package/docs/reference/index.md +5 -0
- package/docs/reference/interfaces/IComponent.md +30 -8
- package/docs/reference/interfaces/IError.md +1 -1
- package/docs/reference/interfaces/ILocaleDictionary.md +1 -1
- package/docs/reference/interfaces/IValidationFailure.md +1 -1
- package/docs/reference/type-aliases/CoerceType.md +5 -0
- package/docs/reference/variables/CoerceType.md +67 -0
- package/docs/reference/variables/CompressionType.md +1 -1
- package/locales/en.json +21 -1
- package/package.json +6 -6
|
@@ -16,15 +16,21 @@ Create a new instance of NotSupportedError.
|
|
|
16
16
|
|
|
17
17
|
#### Parameters
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
##### source
|
|
20
|
+
|
|
21
|
+
`string`
|
|
20
22
|
|
|
21
23
|
The source of the error.
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
##### message
|
|
26
|
+
|
|
27
|
+
`string`
|
|
24
28
|
|
|
25
29
|
The message as a code.
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
##### inner?
|
|
32
|
+
|
|
33
|
+
`unknown`
|
|
28
34
|
|
|
29
35
|
The inner error if we have wrapped another error.
|
|
30
36
|
|
|
@@ -46,7 +52,7 @@ The source of the error.
|
|
|
46
52
|
|
|
47
53
|
#### Inherited from
|
|
48
54
|
|
|
49
|
-
[`BaseError`](BaseError.md).[`source`](BaseError.md#source)
|
|
55
|
+
[`BaseError`](BaseError.md).[`source`](BaseError.md#source-1)
|
|
50
56
|
|
|
51
57
|
***
|
|
52
58
|
|
|
@@ -58,11 +64,11 @@ Any additional information for the error.
|
|
|
58
64
|
|
|
59
65
|
#### Index Signature
|
|
60
66
|
|
|
61
|
-
|
|
67
|
+
\[`id`: `string`\]: `unknown`
|
|
62
68
|
|
|
63
69
|
#### Inherited from
|
|
64
70
|
|
|
65
|
-
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties)
|
|
71
|
+
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties-1)
|
|
66
72
|
|
|
67
73
|
***
|
|
68
74
|
|
|
@@ -74,7 +80,7 @@ The inner error if there was one.
|
|
|
74
80
|
|
|
75
81
|
#### Inherited from
|
|
76
82
|
|
|
77
|
-
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner)
|
|
83
|
+
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner-1)
|
|
78
84
|
|
|
79
85
|
***
|
|
80
86
|
|
|
@@ -94,7 +100,9 @@ Construct an error from an existing one.
|
|
|
94
100
|
|
|
95
101
|
#### Parameters
|
|
96
102
|
|
|
97
|
-
|
|
103
|
+
##### err
|
|
104
|
+
|
|
105
|
+
`unknown`
|
|
98
106
|
|
|
99
107
|
The existing error.
|
|
100
108
|
|
|
@@ -118,7 +126,9 @@ Flatten an error tree.
|
|
|
118
126
|
|
|
119
127
|
#### Parameters
|
|
120
128
|
|
|
121
|
-
|
|
129
|
+
##### err
|
|
130
|
+
|
|
131
|
+
`unknown`
|
|
122
132
|
|
|
123
133
|
The starting error.
|
|
124
134
|
|
|
@@ -142,10 +152,12 @@ Expand an error tree.
|
|
|
142
152
|
|
|
143
153
|
#### Parameters
|
|
144
154
|
|
|
145
|
-
|
|
155
|
+
##### errors
|
|
146
156
|
|
|
147
157
|
The list of errors to expand.
|
|
148
158
|
|
|
159
|
+
`undefined` | [`IError`](../interfaces/IError.md)[]
|
|
160
|
+
|
|
149
161
|
#### Returns
|
|
150
162
|
|
|
151
163
|
`undefined` \| [`IError`](../interfaces/IError.md)
|
|
@@ -166,14 +178,18 @@ Test to see if the error has the specified error name.
|
|
|
166
178
|
|
|
167
179
|
#### Parameters
|
|
168
180
|
|
|
169
|
-
|
|
181
|
+
##### error
|
|
182
|
+
|
|
183
|
+
`unknown`
|
|
170
184
|
|
|
171
185
|
The error to test.
|
|
172
186
|
|
|
173
|
-
|
|
187
|
+
##### name
|
|
174
188
|
|
|
175
189
|
The name to check for.
|
|
176
190
|
|
|
191
|
+
`string` | `RegExp`
|
|
192
|
+
|
|
177
193
|
#### Returns
|
|
178
194
|
|
|
179
195
|
`error is BaseError`
|
|
@@ -194,14 +210,18 @@ Test to see if the error has the specified error message.
|
|
|
194
210
|
|
|
195
211
|
#### Parameters
|
|
196
212
|
|
|
197
|
-
|
|
213
|
+
##### error
|
|
214
|
+
|
|
215
|
+
`unknown`
|
|
198
216
|
|
|
199
217
|
The error to test.
|
|
200
218
|
|
|
201
|
-
|
|
219
|
+
##### message
|
|
202
220
|
|
|
203
221
|
The message to check for.
|
|
204
222
|
|
|
223
|
+
`string` | `RegExp`
|
|
224
|
+
|
|
205
225
|
#### Returns
|
|
206
226
|
|
|
207
227
|
`error is BaseError`
|
|
@@ -222,14 +242,18 @@ Test to see if the error has the specified error code.
|
|
|
222
242
|
|
|
223
243
|
#### Parameters
|
|
224
244
|
|
|
225
|
-
|
|
245
|
+
##### error
|
|
246
|
+
|
|
247
|
+
`unknown`
|
|
226
248
|
|
|
227
249
|
The error to test.
|
|
228
250
|
|
|
229
|
-
|
|
251
|
+
##### code
|
|
230
252
|
|
|
231
253
|
The code to check for.
|
|
232
254
|
|
|
255
|
+
`string` | `RegExp`
|
|
256
|
+
|
|
233
257
|
#### Returns
|
|
234
258
|
|
|
235
259
|
`boolean`
|
|
@@ -250,14 +274,18 @@ Test to see if any of the errors or children have the given error name.
|
|
|
250
274
|
|
|
251
275
|
#### Parameters
|
|
252
276
|
|
|
253
|
-
|
|
277
|
+
##### error
|
|
278
|
+
|
|
279
|
+
`unknown`
|
|
254
280
|
|
|
255
281
|
The error to test.
|
|
256
282
|
|
|
257
|
-
|
|
283
|
+
##### name
|
|
258
284
|
|
|
259
285
|
The name to check for.
|
|
260
286
|
|
|
287
|
+
`string` | `RegExp`
|
|
288
|
+
|
|
261
289
|
#### Returns
|
|
262
290
|
|
|
263
291
|
`error is BaseError`
|
|
@@ -278,14 +306,18 @@ Test to see if any of the errors or children have the given error message.
|
|
|
278
306
|
|
|
279
307
|
#### Parameters
|
|
280
308
|
|
|
281
|
-
|
|
309
|
+
##### error
|
|
310
|
+
|
|
311
|
+
`unknown`
|
|
282
312
|
|
|
283
313
|
The error to test.
|
|
284
314
|
|
|
285
|
-
|
|
315
|
+
##### message
|
|
286
316
|
|
|
287
317
|
The message to check for.
|
|
288
318
|
|
|
319
|
+
`string` | `RegExp`
|
|
320
|
+
|
|
289
321
|
#### Returns
|
|
290
322
|
|
|
291
323
|
`error is BaseError`
|
|
@@ -306,11 +338,15 @@ Test to see if any of the errors or children are from a specific class.
|
|
|
306
338
|
|
|
307
339
|
#### Parameters
|
|
308
340
|
|
|
309
|
-
|
|
341
|
+
##### error
|
|
342
|
+
|
|
343
|
+
`unknown`
|
|
310
344
|
|
|
311
345
|
The error to test.
|
|
312
346
|
|
|
313
|
-
|
|
347
|
+
##### cls
|
|
348
|
+
|
|
349
|
+
`string`
|
|
314
350
|
|
|
315
351
|
The class to check for.
|
|
316
352
|
|
|
@@ -334,14 +370,18 @@ Test to see if any of the errors or children have the given error code.
|
|
|
334
370
|
|
|
335
371
|
#### Parameters
|
|
336
372
|
|
|
337
|
-
|
|
373
|
+
##### error
|
|
374
|
+
|
|
375
|
+
`unknown`
|
|
338
376
|
|
|
339
377
|
The error to test.
|
|
340
378
|
|
|
341
|
-
|
|
379
|
+
##### code
|
|
342
380
|
|
|
343
381
|
The code to check for.
|
|
344
382
|
|
|
383
|
+
`string` | `RegExp`
|
|
384
|
+
|
|
345
385
|
#### Returns
|
|
346
386
|
|
|
347
387
|
`error is BaseError`
|
|
@@ -26,11 +26,15 @@ Convert an object to bytes.
|
|
|
26
26
|
|
|
27
27
|
#### Parameters
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
##### obj
|
|
30
30
|
|
|
31
31
|
The object to convert.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
`undefined` | `T`
|
|
34
|
+
|
|
35
|
+
##### format
|
|
36
|
+
|
|
37
|
+
`boolean` = `false`
|
|
34
38
|
|
|
35
39
|
Format the JSON content.
|
|
36
40
|
|
|
@@ -54,10 +58,12 @@ Convert a bytes to an object.
|
|
|
54
58
|
|
|
55
59
|
#### Parameters
|
|
56
60
|
|
|
57
|
-
|
|
61
|
+
##### bytes
|
|
58
62
|
|
|
59
63
|
The bytes to convert to an object.
|
|
60
64
|
|
|
65
|
+
`undefined` | `null` | `Uint8Array`\<`ArrayBufferLike`\>
|
|
66
|
+
|
|
61
67
|
#### Returns
|
|
62
68
|
|
|
63
69
|
`T`
|
|
@@ -82,7 +88,9 @@ Make a deep clone of an object.
|
|
|
82
88
|
|
|
83
89
|
#### Parameters
|
|
84
90
|
|
|
85
|
-
|
|
91
|
+
##### obj
|
|
92
|
+
|
|
93
|
+
`T`
|
|
86
94
|
|
|
87
95
|
The object to clone.
|
|
88
96
|
|
|
@@ -108,11 +116,15 @@ Deep merge objects.
|
|
|
108
116
|
|
|
109
117
|
#### Parameters
|
|
110
118
|
|
|
111
|
-
|
|
119
|
+
##### obj1
|
|
120
|
+
|
|
121
|
+
`T`
|
|
112
122
|
|
|
113
123
|
The first object to merge.
|
|
114
124
|
|
|
115
|
-
|
|
125
|
+
##### obj2
|
|
126
|
+
|
|
127
|
+
`U`
|
|
116
128
|
|
|
117
129
|
The second object to merge.
|
|
118
130
|
|
|
@@ -136,15 +148,21 @@ Does one object equal another.
|
|
|
136
148
|
|
|
137
149
|
#### Parameters
|
|
138
150
|
|
|
139
|
-
|
|
151
|
+
##### obj1
|
|
152
|
+
|
|
153
|
+
`T`
|
|
140
154
|
|
|
141
155
|
The first object to compare.
|
|
142
156
|
|
|
143
|
-
|
|
157
|
+
##### obj2
|
|
158
|
+
|
|
159
|
+
`T`
|
|
144
160
|
|
|
145
161
|
The second object to compare.
|
|
146
162
|
|
|
147
|
-
|
|
163
|
+
##### strictPropertyOrder?
|
|
164
|
+
|
|
165
|
+
`boolean`
|
|
148
166
|
|
|
149
167
|
Should the properties be in the same order, defaults to true.
|
|
150
168
|
|
|
@@ -168,11 +186,15 @@ Get the property of an unknown object.
|
|
|
168
186
|
|
|
169
187
|
#### Parameters
|
|
170
188
|
|
|
171
|
-
|
|
189
|
+
##### obj
|
|
190
|
+
|
|
191
|
+
`unknown`
|
|
172
192
|
|
|
173
193
|
The object to get the property from.
|
|
174
194
|
|
|
175
|
-
|
|
195
|
+
##### property
|
|
196
|
+
|
|
197
|
+
`string`
|
|
176
198
|
|
|
177
199
|
The property to get, can be separated by dots for nested path.
|
|
178
200
|
|
|
@@ -192,15 +214,21 @@ Set the property of an unknown object.
|
|
|
192
214
|
|
|
193
215
|
#### Parameters
|
|
194
216
|
|
|
195
|
-
|
|
217
|
+
##### obj
|
|
218
|
+
|
|
219
|
+
`unknown`
|
|
196
220
|
|
|
197
221
|
The object to set the property from.
|
|
198
222
|
|
|
199
|
-
|
|
223
|
+
##### property
|
|
224
|
+
|
|
225
|
+
`string`
|
|
200
226
|
|
|
201
227
|
The property to set.
|
|
202
228
|
|
|
203
|
-
|
|
229
|
+
##### value
|
|
230
|
+
|
|
231
|
+
`unknown`
|
|
204
232
|
|
|
205
233
|
The value to set.
|
|
206
234
|
|
|
@@ -208,6 +236,10 @@ The value to set.
|
|
|
208
236
|
|
|
209
237
|
`void`
|
|
210
238
|
|
|
239
|
+
#### Throws
|
|
240
|
+
|
|
241
|
+
GeneralError if the property target is not an object.
|
|
242
|
+
|
|
211
243
|
***
|
|
212
244
|
|
|
213
245
|
### propertyDelete()
|
|
@@ -218,11 +250,15 @@ Delete the property of an unknown object.
|
|
|
218
250
|
|
|
219
251
|
#### Parameters
|
|
220
252
|
|
|
221
|
-
|
|
253
|
+
##### obj
|
|
254
|
+
|
|
255
|
+
`unknown`
|
|
222
256
|
|
|
223
257
|
The object to set the property from.
|
|
224
258
|
|
|
225
|
-
|
|
259
|
+
##### property
|
|
260
|
+
|
|
261
|
+
`string`
|
|
226
262
|
|
|
227
263
|
The property to set
|
|
228
264
|
|
|
@@ -232,6 +268,44 @@ The property to set
|
|
|
232
268
|
|
|
233
269
|
***
|
|
234
270
|
|
|
271
|
+
### extractProperty()
|
|
272
|
+
|
|
273
|
+
> `static` **extractProperty**\<`T`\>(`obj`, `propertyNames`, `removeProperties`): `undefined` \| `T`
|
|
274
|
+
|
|
275
|
+
Extract a property from the object, providing alternative names.
|
|
276
|
+
|
|
277
|
+
#### Type Parameters
|
|
278
|
+
|
|
279
|
+
• **T**
|
|
280
|
+
|
|
281
|
+
#### Parameters
|
|
282
|
+
|
|
283
|
+
##### obj
|
|
284
|
+
|
|
285
|
+
`unknown`
|
|
286
|
+
|
|
287
|
+
The object to extract from.
|
|
288
|
+
|
|
289
|
+
##### propertyNames
|
|
290
|
+
|
|
291
|
+
The possible names for the property.
|
|
292
|
+
|
|
293
|
+
`string` | `string`[]
|
|
294
|
+
|
|
295
|
+
##### removeProperties
|
|
296
|
+
|
|
297
|
+
`boolean` = `true`
|
|
298
|
+
|
|
299
|
+
Remove the properties from the object, defaults to true.
|
|
300
|
+
|
|
301
|
+
#### Returns
|
|
302
|
+
|
|
303
|
+
`undefined` \| `T`
|
|
304
|
+
|
|
305
|
+
The property if available.
|
|
306
|
+
|
|
307
|
+
***
|
|
308
|
+
|
|
235
309
|
### pick()
|
|
236
310
|
|
|
237
311
|
> `static` **pick**\<`T`\>(`obj`, `keys`?): `Partial`\<`T`\>
|
|
@@ -244,11 +318,15 @@ Pick a subset of properties from an object.
|
|
|
244
318
|
|
|
245
319
|
#### Parameters
|
|
246
320
|
|
|
247
|
-
|
|
321
|
+
##### obj
|
|
248
322
|
|
|
249
323
|
The object to pick the properties from.
|
|
250
324
|
|
|
251
|
-
|
|
325
|
+
`undefined` | `T`
|
|
326
|
+
|
|
327
|
+
##### keys?
|
|
328
|
+
|
|
329
|
+
keyof `T`[]
|
|
252
330
|
|
|
253
331
|
The property keys to pick.
|
|
254
332
|
|
|
@@ -272,11 +350,15 @@ Omit a subset of properties from an object.
|
|
|
272
350
|
|
|
273
351
|
#### Parameters
|
|
274
352
|
|
|
275
|
-
|
|
353
|
+
##### obj
|
|
276
354
|
|
|
277
355
|
The object to omit the properties from.
|
|
278
356
|
|
|
279
|
-
|
|
357
|
+
`undefined` | `T`
|
|
358
|
+
|
|
359
|
+
##### keys?
|
|
360
|
+
|
|
361
|
+
keyof `T`[]
|
|
280
362
|
|
|
281
363
|
The property keys to omit.
|
|
282
364
|
|
|
@@ -285,3 +367,89 @@ The property keys to omit.
|
|
|
285
367
|
`Partial`\<`T`\>
|
|
286
368
|
|
|
287
369
|
The partial object.
|
|
370
|
+
|
|
371
|
+
***
|
|
372
|
+
|
|
373
|
+
### toExtended()
|
|
374
|
+
|
|
375
|
+
> `static` **toExtended**(`obj`): `any`
|
|
376
|
+
|
|
377
|
+
Converter the non JSON primitives to extended types.
|
|
378
|
+
|
|
379
|
+
#### Parameters
|
|
380
|
+
|
|
381
|
+
##### obj
|
|
382
|
+
|
|
383
|
+
`any`
|
|
384
|
+
|
|
385
|
+
The object to convert.
|
|
386
|
+
|
|
387
|
+
#### Returns
|
|
388
|
+
|
|
389
|
+
`any`
|
|
390
|
+
|
|
391
|
+
The object with extended properties.
|
|
392
|
+
|
|
393
|
+
***
|
|
394
|
+
|
|
395
|
+
### fromExtended()
|
|
396
|
+
|
|
397
|
+
> `static` **fromExtended**(`obj`): `any`
|
|
398
|
+
|
|
399
|
+
Converter the extended types to non JSON primitives.
|
|
400
|
+
|
|
401
|
+
#### Parameters
|
|
402
|
+
|
|
403
|
+
##### obj
|
|
404
|
+
|
|
405
|
+
`any`
|
|
406
|
+
|
|
407
|
+
The object to convert.
|
|
408
|
+
|
|
409
|
+
#### Returns
|
|
410
|
+
|
|
411
|
+
`any`
|
|
412
|
+
|
|
413
|
+
The object with regular properties.
|
|
414
|
+
|
|
415
|
+
***
|
|
416
|
+
|
|
417
|
+
### removeEmptyProperties()
|
|
418
|
+
|
|
419
|
+
> `static` **removeEmptyProperties**\<`T`\>(`obj`, `options`?): `T`
|
|
420
|
+
|
|
421
|
+
Remove empty properties from an object.
|
|
422
|
+
|
|
423
|
+
#### Type Parameters
|
|
424
|
+
|
|
425
|
+
• **T** = `unknown`
|
|
426
|
+
|
|
427
|
+
#### Parameters
|
|
428
|
+
|
|
429
|
+
##### obj
|
|
430
|
+
|
|
431
|
+
`T`
|
|
432
|
+
|
|
433
|
+
The object to remove the empty properties from.
|
|
434
|
+
|
|
435
|
+
##### options?
|
|
436
|
+
|
|
437
|
+
The options for the removal.
|
|
438
|
+
|
|
439
|
+
###### removeUndefined?
|
|
440
|
+
|
|
441
|
+
`boolean`
|
|
442
|
+
|
|
443
|
+
Remove undefined properties, defaults to true.
|
|
444
|
+
|
|
445
|
+
###### removeNull?
|
|
446
|
+
|
|
447
|
+
`boolean`
|
|
448
|
+
|
|
449
|
+
Remove null properties, defaults to false.
|
|
450
|
+
|
|
451
|
+
#### Returns
|
|
452
|
+
|
|
453
|
+
`T`
|
|
454
|
+
|
|
455
|
+
The object with empty properties removed.
|
|
@@ -22,10 +22,12 @@ Trim trailing slashes from a string.
|
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##### value
|
|
26
26
|
|
|
27
27
|
The value to trim.
|
|
28
28
|
|
|
29
|
+
`undefined` | `string`
|
|
30
|
+
|
|
29
31
|
#### Returns
|
|
30
32
|
|
|
31
33
|
`string`
|
|
@@ -42,10 +44,12 @@ Trim leading slashes from a string.
|
|
|
42
44
|
|
|
43
45
|
#### Parameters
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
##### value
|
|
46
48
|
|
|
47
49
|
The value to trim.
|
|
48
50
|
|
|
51
|
+
`undefined` | `string`
|
|
52
|
+
|
|
49
53
|
#### Returns
|
|
50
54
|
|
|
51
55
|
`string`
|
|
@@ -62,11 +66,15 @@ Convert the input string to kebab case.
|
|
|
62
66
|
|
|
63
67
|
#### Parameters
|
|
64
68
|
|
|
65
|
-
|
|
69
|
+
##### input
|
|
70
|
+
|
|
71
|
+
`string`
|
|
66
72
|
|
|
67
73
|
The input to convert.
|
|
68
74
|
|
|
69
|
-
|
|
75
|
+
##### stripInterfacePrefix
|
|
76
|
+
|
|
77
|
+
`boolean` = `true`
|
|
70
78
|
|
|
71
79
|
Strip interface prefixes.
|
|
72
80
|
|
|
@@ -86,11 +94,15 @@ Convert the input string to snake case.
|
|
|
86
94
|
|
|
87
95
|
#### Parameters
|
|
88
96
|
|
|
89
|
-
|
|
97
|
+
##### input
|
|
98
|
+
|
|
99
|
+
`string`
|
|
90
100
|
|
|
91
101
|
The input to convert.
|
|
92
102
|
|
|
93
|
-
|
|
103
|
+
##### stripInterfacePrefix
|
|
104
|
+
|
|
105
|
+
`boolean` = `true`
|
|
94
106
|
|
|
95
107
|
Strip interface prefixes.
|
|
96
108
|
|
|
@@ -110,11 +122,15 @@ Title case all the words.
|
|
|
110
122
|
|
|
111
123
|
#### Parameters
|
|
112
124
|
|
|
113
|
-
|
|
125
|
+
##### input
|
|
126
|
+
|
|
127
|
+
`string`
|
|
114
128
|
|
|
115
129
|
The input to convert.
|
|
116
130
|
|
|
117
|
-
|
|
131
|
+
##### stripInterfacePrefix
|
|
132
|
+
|
|
133
|
+
`boolean` = `true`
|
|
118
134
|
|
|
119
135
|
Strip interface prefixes.
|
|
120
136
|
|
|
@@ -134,11 +150,15 @@ Pascal case all the words.
|
|
|
134
150
|
|
|
135
151
|
#### Parameters
|
|
136
152
|
|
|
137
|
-
|
|
153
|
+
##### input
|
|
154
|
+
|
|
155
|
+
`string`
|
|
138
156
|
|
|
139
157
|
The input to convert.
|
|
140
158
|
|
|
141
|
-
|
|
159
|
+
##### stripInterfacePrefix
|
|
160
|
+
|
|
161
|
+
`boolean` = `true`
|
|
142
162
|
|
|
143
163
|
Strip interface prefixes.
|
|
144
164
|
|
|
@@ -158,11 +178,15 @@ Camel case all the words.
|
|
|
158
178
|
|
|
159
179
|
#### Parameters
|
|
160
180
|
|
|
161
|
-
|
|
181
|
+
##### input
|
|
182
|
+
|
|
183
|
+
`string`
|
|
162
184
|
|
|
163
185
|
The input to convert.
|
|
164
186
|
|
|
165
|
-
|
|
187
|
+
##### stripInterfacePrefix
|
|
188
|
+
|
|
189
|
+
`boolean` = `true`
|
|
166
190
|
|
|
167
191
|
Strip interface prefixes.
|
|
168
192
|
|
|
@@ -182,11 +206,15 @@ Convert the words to a path.
|
|
|
182
206
|
|
|
183
207
|
#### Parameters
|
|
184
208
|
|
|
185
|
-
|
|
209
|
+
##### input
|
|
210
|
+
|
|
211
|
+
`string`
|
|
186
212
|
|
|
187
213
|
The input to convert.
|
|
188
214
|
|
|
189
|
-
|
|
215
|
+
##### stripInterfacePrefix
|
|
216
|
+
|
|
217
|
+
`boolean` = `true`
|
|
190
218
|
|
|
191
219
|
Strip interface prefixes.
|
|
192
220
|
|
|
@@ -206,7 +234,9 @@ Strip interface prefix if there is one.
|
|
|
206
234
|
|
|
207
235
|
#### Parameters
|
|
208
236
|
|
|
209
|
-
|
|
237
|
+
##### input
|
|
238
|
+
|
|
239
|
+
`string`
|
|
210
240
|
|
|
211
241
|
The input to strip.
|
|
212
242
|
|
|
@@ -226,7 +256,9 @@ Split a string into words.
|
|
|
226
256
|
|
|
227
257
|
#### Parameters
|
|
228
258
|
|
|
229
|
-
|
|
259
|
+
##### input
|
|
260
|
+
|
|
261
|
+
`string`
|
|
230
262
|
|
|
231
263
|
The input to split.
|
|
232
264
|
|
|
@@ -259,7 +291,9 @@ UTF8-tail = %x80-BF.
|
|
|
259
291
|
|
|
260
292
|
#### Parameters
|
|
261
293
|
|
|
262
|
-
|
|
294
|
+
##### data
|
|
295
|
+
|
|
296
|
+
`Uint8Array`
|
|
263
297
|
|
|
264
298
|
The data to check.
|
|
265
299
|
|