@twin.org/core 0.0.3-next.4 → 0.0.3-next.41

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 (144) hide show
  1. package/README.md +1 -9
  2. package/dist/es/encoding/base32.js +1 -1
  3. package/dist/es/encoding/base32.js.map +1 -1
  4. package/dist/es/encoding/base64.js +1 -1
  5. package/dist/es/encoding/base64.js.map +1 -1
  6. package/dist/es/errors/alreadyExistsError.js +1 -1
  7. package/dist/es/errors/alreadyExistsError.js.map +1 -1
  8. package/dist/es/errors/baseError.js +1 -1
  9. package/dist/es/errors/baseError.js.map +1 -1
  10. package/dist/es/errors/conflictError.js +1 -1
  11. package/dist/es/errors/conflictError.js.map +1 -1
  12. package/dist/es/errors/generalError.js +1 -1
  13. package/dist/es/errors/generalError.js.map +1 -1
  14. package/dist/es/errors/guardError.js +1 -1
  15. package/dist/es/errors/guardError.js.map +1 -1
  16. package/dist/es/errors/notFoundError.js +1 -1
  17. package/dist/es/errors/notFoundError.js.map +1 -1
  18. package/dist/es/errors/notSupportedError.js +1 -1
  19. package/dist/es/errors/notSupportedError.js.map +1 -1
  20. package/dist/es/errors/unauthorizedError.js +2 -2
  21. package/dist/es/errors/unauthorizedError.js.map +1 -1
  22. package/dist/es/errors/unprocessableError.js +1 -1
  23. package/dist/es/errors/unprocessableError.js.map +1 -1
  24. package/dist/es/factories/factory.js +41 -0
  25. package/dist/es/factories/factory.js.map +1 -1
  26. package/dist/es/helpers/arrayHelper.js +2 -0
  27. package/dist/es/helpers/arrayHelper.js.map +1 -1
  28. package/dist/es/helpers/jsonHelper.js.map +1 -1
  29. package/dist/es/helpers/objectHelper.js +12 -36
  30. package/dist/es/helpers/objectHelper.js.map +1 -1
  31. package/dist/es/helpers/randomHelper.js +50 -2
  32. package/dist/es/helpers/randomHelper.js.map +1 -1
  33. package/dist/es/helpers/stringHelper.js +11 -0
  34. package/dist/es/helpers/stringHelper.js.map +1 -1
  35. package/dist/es/index.js +4 -1
  36. package/dist/es/index.js.map +1 -1
  37. package/dist/es/models/IComponent.js +0 -2
  38. package/dist/es/models/IComponent.js.map +1 -1
  39. package/dist/es/models/IError.js.map +1 -1
  40. package/dist/es/models/IHealth.js +2 -0
  41. package/dist/es/models/IHealth.js.map +1 -0
  42. package/dist/es/models/healthStatus.js +21 -0
  43. package/dist/es/models/healthStatus.js.map +1 -0
  44. package/dist/es/types/objectOrArray.js.map +1 -0
  45. package/dist/es/types/singleOccurrenceArray.js +2 -0
  46. package/dist/es/types/singleOccurrenceArray.js.map +1 -0
  47. package/dist/es/types/urn.js +1 -2
  48. package/dist/es/types/urn.js.map +1 -1
  49. package/dist/es/utils/asyncCache.js +102 -75
  50. package/dist/es/utils/asyncCache.js.map +1 -1
  51. package/dist/es/utils/guards.js +16 -0
  52. package/dist/es/utils/guards.js.map +1 -1
  53. package/dist/es/utils/i18n.js.map +1 -1
  54. package/dist/es/utils/is.js +16 -0
  55. package/dist/es/utils/is.js.map +1 -1
  56. package/dist/types/encoding/base32.d.ts +1 -1
  57. package/dist/types/errors/alreadyExistsError.d.ts +1 -1
  58. package/dist/types/errors/baseError.d.ts +1 -1
  59. package/dist/types/errors/conflictError.d.ts +1 -1
  60. package/dist/types/errors/generalError.d.ts +1 -1
  61. package/dist/types/errors/guardError.d.ts +1 -1
  62. package/dist/types/errors/notFoundError.d.ts +1 -1
  63. package/dist/types/errors/notSupportedError.d.ts +1 -1
  64. package/dist/types/errors/unauthorizedError.d.ts +2 -2
  65. package/dist/types/errors/unprocessableError.d.ts +1 -1
  66. package/dist/types/factories/factory.d.ts +23 -1
  67. package/dist/types/helpers/arrayHelper.d.ts +1 -8
  68. package/dist/types/helpers/objectHelper.d.ts +18 -14
  69. package/dist/types/helpers/randomHelper.d.ts +16 -0
  70. package/dist/types/helpers/stringHelper.d.ts +6 -0
  71. package/dist/types/index.d.ts +4 -1
  72. package/dist/types/models/IComponent.d.ts +12 -0
  73. package/dist/types/models/IError.d.ts +1 -1
  74. package/dist/types/models/IHealth.d.ts +32 -0
  75. package/dist/types/models/healthStatus.d.ts +21 -0
  76. package/dist/types/types/singleOccurrenceArray.d.ts +9 -0
  77. package/dist/types/utils/asyncCache.d.ts +7 -0
  78. package/dist/types/utils/guards.d.ts +10 -1
  79. package/dist/types/utils/is.d.ts +7 -0
  80. package/docs/changelog.md +887 -184
  81. package/docs/examples.md +308 -1
  82. package/docs/reference/classes/AlreadyExistsError.md +36 -36
  83. package/docs/reference/classes/ArrayHelper.md +10 -44
  84. package/docs/reference/classes/AsyncCache.md +8 -8
  85. package/docs/reference/classes/Base32.md +4 -4
  86. package/docs/reference/classes/Base58.md +3 -3
  87. package/docs/reference/classes/Base64.md +4 -4
  88. package/docs/reference/classes/Base64Url.md +3 -3
  89. package/docs/reference/classes/BaseError.md +35 -35
  90. package/docs/reference/classes/BitString.md +6 -6
  91. package/docs/reference/classes/Coerce.md +11 -11
  92. package/docs/reference/classes/Compression.md +3 -3
  93. package/docs/reference/classes/ConflictError.md +36 -36
  94. package/docs/reference/classes/Converter.md +18 -18
  95. package/docs/reference/classes/EnvHelper.md +1 -1
  96. package/docs/reference/classes/ErrorHelper.md +3 -3
  97. package/docs/reference/classes/Factory.md +112 -18
  98. package/docs/reference/classes/FilenameHelper.md +1 -1
  99. package/docs/reference/classes/GeneralError.md +36 -36
  100. package/docs/reference/classes/GuardError.md +36 -36
  101. package/docs/reference/classes/Guards.md +72 -30
  102. package/docs/reference/classes/HexHelper.md +6 -6
  103. package/docs/reference/classes/I18n.md +14 -14
  104. package/docs/reference/classes/Is.md +67 -39
  105. package/docs/reference/classes/JsonHelper.md +10 -10
  106. package/docs/reference/classes/NotFoundError.md +36 -36
  107. package/docs/reference/classes/NotImplementedError.md +35 -35
  108. package/docs/reference/classes/NotSupportedError.md +36 -36
  109. package/docs/reference/classes/NumberHelper.md +2 -2
  110. package/docs/reference/classes/ObjectHelper.md +135 -73
  111. package/docs/reference/classes/RandomHelper.md +53 -1
  112. package/docs/reference/classes/SharedStore.md +3 -3
  113. package/docs/reference/classes/StringHelper.md +45 -23
  114. package/docs/reference/classes/Uint8ArrayHelper.md +1 -1
  115. package/docs/reference/classes/UnauthorizedError.md +37 -37
  116. package/docs/reference/classes/UnprocessableError.md +36 -36
  117. package/docs/reference/classes/Url.md +8 -8
  118. package/docs/reference/classes/Urn.md +24 -24
  119. package/docs/reference/classes/Validation.md +25 -25
  120. package/docs/reference/classes/ValidationError.md +35 -35
  121. package/docs/reference/index.md +5 -0
  122. package/docs/reference/interfaces/IComponent.md +40 -4
  123. package/docs/reference/interfaces/IError.md +11 -11
  124. package/docs/reference/interfaces/IHealth.md +55 -0
  125. package/docs/reference/interfaces/II18nShared.md +4 -4
  126. package/docs/reference/interfaces/IKeyValue.md +2 -2
  127. package/docs/reference/interfaces/ILabelledValue.md +2 -2
  128. package/docs/reference/interfaces/ILocale.md +2 -2
  129. package/docs/reference/interfaces/ILocaleDictionary.md +1 -1
  130. package/docs/reference/interfaces/ILocalesIndex.md +1 -1
  131. package/docs/reference/interfaces/IPatchOperation.md +6 -6
  132. package/docs/reference/interfaces/IUrlParts.md +9 -9
  133. package/docs/reference/interfaces/IValidationFailure.md +4 -4
  134. package/docs/reference/type-aliases/HealthStatus.md +5 -0
  135. package/docs/reference/type-aliases/SingleOccurrenceArray.md +15 -0
  136. package/docs/reference/type-aliases/SingleOccurrenceArrayDepthHelper.md +19 -0
  137. package/docs/reference/variables/CoerceType.md +10 -10
  138. package/docs/reference/variables/CompressionType.md +2 -2
  139. package/docs/reference/variables/HealthStatus.md +25 -0
  140. package/locales/en.json +5 -2
  141. package/package.json +6 -6
  142. package/dist/es/models/objectOrArray.js.map +0 -1
  143. /package/dist/es/{models → types}/objectOrArray.js +0 -0
  144. /package/dist/types/{models → types}/objectOrArray.d.ts +0 -0
@@ -14,7 +14,7 @@ Class to help with objects.
14
14
 
15
15
  ## Properties
16
16
 
17
- ### CLASS\_NAME
17
+ ### CLASS\_NAME {#class_name}
18
18
 
19
19
  > `readonly` `static` **CLASS\_NAME**: `string`
20
20
 
@@ -22,9 +22,9 @@ Runtime name for the class.
22
22
 
23
23
  ## Methods
24
24
 
25
- ### toBytes()
25
+ ### toBytes() {#tobytes}
26
26
 
27
- > `static` **toBytes**\<`T`\>(`obj`, `format`): `Uint8Array`
27
+ > `static` **toBytes**\<`T`\>(`obj`, `format?`): `Uint8Array`
28
28
 
29
29
  Convert an object to bytes.
30
30
 
@@ -38,11 +38,11 @@ Convert an object to bytes.
38
38
 
39
39
  ##### obj
40
40
 
41
- The object to convert.
41
+ `T` \| `undefined`
42
42
 
43
- `T` | `undefined`
43
+ The object to convert.
44
44
 
45
- ##### format
45
+ ##### format?
46
46
 
47
47
  `boolean` = `false`
48
48
 
@@ -56,7 +56,7 @@ The object as bytes.
56
56
 
57
57
  ***
58
58
 
59
- ### fromBytes()
59
+ ### fromBytes() {#frombytes}
60
60
 
61
61
  > `static` **fromBytes**\<`T`\>(`bytes`): `T`
62
62
 
@@ -72,9 +72,9 @@ Convert a bytes to an object.
72
72
 
73
73
  ##### bytes
74
74
 
75
- The bytes to convert to an object.
75
+ `Uint8Array`\<`ArrayBufferLike`\> \| `null` \| `undefined`
76
76
 
77
- `Uint8Array`\<`ArrayBufferLike`\> | `null` | `undefined`
77
+ The bytes to convert to an object.
78
78
 
79
79
  #### Returns
80
80
 
@@ -88,7 +88,7 @@ GeneralError if there was an error parsing the JSON.
88
88
 
89
89
  ***
90
90
 
91
- ### clone()
91
+ ### clone() {#clone}
92
92
 
93
93
  > `static` **clone**\<`T`\>(`obj`): `T`
94
94
 
@@ -116,7 +116,7 @@ The objects clone.
116
116
 
117
117
  ***
118
118
 
119
- ### merge()
119
+ ### merge() {#merge}
120
120
 
121
121
  > `static` **merge**\<`T`, `U`\>(`obj1`, `obj2`): `T` & `U`
122
122
 
@@ -154,7 +154,7 @@ The combined deep merge of the objects.
154
154
 
155
155
  ***
156
156
 
157
- ### equal()
157
+ ### equal() {#equal}
158
158
 
159
159
  > `static` **equal**\<`T`\>(`obj1`, `obj2`, `strictPropertyOrder?`): `boolean`
160
160
 
@@ -194,7 +194,7 @@ True is the objects are equal.
194
194
 
195
195
  ***
196
196
 
197
- ### propertyGet()
197
+ ### propertyGet() {#propertyget}
198
198
 
199
199
  > `static` **propertyGet**\<`T`\>(`obj`, `property`): `T` \| `undefined`
200
200
 
@@ -228,7 +228,7 @@ The property.
228
228
 
229
229
  ***
230
230
 
231
- ### propertySet()
231
+ ### propertySet() {#propertyset}
232
232
 
233
233
  > `static` **propertySet**(`obj`, `property`, `value`): `void`
234
234
 
@@ -264,7 +264,7 @@ GeneralError if the property target is not an object.
264
264
 
265
265
  ***
266
266
 
267
- ### propertyDelete()
267
+ ### propertyDelete() {#propertydelete}
268
268
 
269
269
  > `static` **propertyDelete**(`obj`, `property`): `void`
270
270
 
@@ -276,13 +276,13 @@ Delete the property of an unknown object.
276
276
 
277
277
  `unknown`
278
278
 
279
- The object to set the property from.
279
+ The object to delete the property from.
280
280
 
281
281
  ##### property
282
282
 
283
283
  `string`
284
284
 
285
- The property to set
285
+ The property to delete.
286
286
 
287
287
  #### Returns
288
288
 
@@ -290,9 +290,9 @@ The property to set
290
290
 
291
291
  ***
292
292
 
293
- ### extractProperty()
293
+ ### extractProperty() {#extractproperty}
294
294
 
295
- > `static` **extractProperty**\<`T`\>(`obj`, `propertyNames`, `removeProperties`): `T` \| `undefined`
295
+ > `static` **extractProperty**\<`T`\>(`obj`, `propertyNames`, `removeProperties?`): `T` \| `undefined`
296
296
 
297
297
  Extract a property from the object, providing alternative names.
298
298
 
@@ -312,11 +312,11 @@ The object to extract from.
312
312
 
313
313
  ##### propertyNames
314
314
 
315
- The possible names for the property.
315
+ `string` \| `string`[]
316
316
 
317
- `string` | `string`[]
317
+ The possible names for the property.
318
318
 
319
- ##### removeProperties
319
+ ##### removeProperties?
320
320
 
321
321
  `boolean` = `true`
322
322
 
@@ -330,117 +330,179 @@ The property if available.
330
330
 
331
331
  ***
332
332
 
333
- ### pick()
333
+ ### pick() {#pick}
334
+
335
+ Pick a subset of properties from an object.
336
+
337
+ #### Param
338
+
339
+ The object to pick the properties from.
340
+
341
+ #### Param
342
+
343
+ The property keys to pick.
344
+
345
+ #### Call Signature
334
346
 
335
- > `static` **pick**\<`T`\>(`obj`, `keys?`): `Partial`\<`T`\>
347
+ > `static` **pick**\<`T`, `K`\>(`obj`, `keys?`): `Pick`\<`T`, `K`\>
336
348
 
337
349
  Pick a subset of properties from an object.
338
350
 
339
- #### Type Parameters
351
+ ##### Type Parameters
340
352
 
341
- ##### T
353
+ ###### T
342
354
 
343
355
  `T`
344
356
 
345
- #### Parameters
357
+ ###### K
346
358
 
347
- ##### obj
359
+ `K` *extends* `string` \| `number` \| `symbol`
360
+
361
+ ##### Parameters
362
+
363
+ ###### obj
364
+
365
+ `T`
348
366
 
349
367
  The object to pick the properties from.
350
368
 
351
- `T` | `undefined`
369
+ ###### keys?
370
+
371
+ `K`[]
372
+
373
+ The property keys to pick.
374
+
375
+ ##### Returns
376
+
377
+ `Pick`\<`T`, `K`\>
378
+
379
+ The picked object.
380
+
381
+ #### Call Signature
382
+
383
+ > `static` **pick**\<`T`, `K`\>(`obj`, `keys?`): `Pick`\<`T`, `K`\> \| `undefined`
384
+
385
+ Pick a subset of properties from an object.
386
+
387
+ ##### Type Parameters
388
+
389
+ ###### T
390
+
391
+ `T`
392
+
393
+ ###### K
352
394
 
353
- ##### keys?
395
+ `K` *extends* `string` \| `number` \| `symbol`
354
396
 
355
- keyof `T`[]
397
+ ##### Parameters
398
+
399
+ ###### obj
400
+
401
+ `T` \| `undefined`
402
+
403
+ The object to pick the properties from.
404
+
405
+ ###### keys?
406
+
407
+ `K`[]
356
408
 
357
409
  The property keys to pick.
358
410
 
359
- #### Returns
411
+ ##### Returns
360
412
 
361
- `Partial`\<`T`\>
413
+ `Pick`\<`T`, `K`\> \| `undefined`
362
414
 
363
- The partial object.
415
+ The picked object, or undefined if the input was undefined.
364
416
 
365
417
  ***
366
418
 
367
- ### omit()
419
+ ### omit() {#omit}
420
+
421
+ Omit a subset of properties from an object.
422
+
423
+ #### Param
424
+
425
+ The object to omit the properties from.
426
+
427
+ #### Param
428
+
429
+ The property keys to omit.
430
+
431
+ #### Call Signature
368
432
 
369
- > `static` **omit**\<`T`\>(`obj`, `keys?`): `Partial`\<`T`\>
433
+ > `static` **omit**\<`T`, `K`\>(`obj`, `keys?`): `Omit`\<`T`, `K`\>
370
434
 
371
435
  Omit a subset of properties from an object.
372
436
 
373
- #### Type Parameters
437
+ ##### Type Parameters
374
438
 
375
- ##### T
439
+ ###### T
376
440
 
377
441
  `T`
378
442
 
379
- #### Parameters
380
-
381
- ##### obj
443
+ ###### K
382
444
 
383
- The object to omit the properties from.
445
+ `K` *extends* `string` \| `number` \| `symbol`
384
446
 
385
- `T` | `undefined`
447
+ ##### Parameters
386
448
 
387
- ##### keys?
449
+ ###### obj
388
450
 
389
- keyof `T`[]
451
+ `T`
390
452
 
391
- The property keys to omit.
453
+ The object to omit the properties from.
392
454
 
393
- #### Returns
455
+ ###### keys?
394
456
 
395
- `Partial`\<`T`\>
457
+ `K`[]
396
458
 
397
- The partial object.
459
+ The property keys to omit.
398
460
 
399
- ***
461
+ ##### Returns
400
462
 
401
- ### split()
463
+ `Omit`\<`T`, `K`\>
402
464
 
403
- > `static` **split**\<`T`\>(`obj`, `keys?`): `object`
465
+ The object without the omitted keys.
404
466
 
405
- Split an object into two with the specified keys.
467
+ #### Call Signature
406
468
 
407
- #### Type Parameters
469
+ > `static` **omit**\<`T`, `K`\>(`obj`, `keys?`): `Omit`\<`T`, `K`\> \| `undefined`
408
470
 
409
- ##### T
471
+ Omit a subset of properties from an object.
410
472
 
411
- `T`
473
+ ##### Type Parameters
412
474
 
413
- #### Parameters
475
+ ###### T
414
476
 
415
- ##### obj
477
+ `T`
416
478
 
417
- The object to split.
479
+ ###### K
418
480
 
419
- `T` | `undefined`
481
+ `K` *extends* `string` \| `number` \| `symbol`
420
482
 
421
- ##### keys?
483
+ ##### Parameters
422
484
 
423
- keyof `T`[]
485
+ ###### obj
424
486
 
425
- The property keys to split.
487
+ `T` \| `undefined`
426
488
 
427
- #### Returns
489
+ The object to omit the properties from.
428
490
 
429
- `object`
491
+ ###### keys?
430
492
 
431
- The two partial objects.
493
+ `K`[]
432
494
 
433
- ##### picked
495
+ The property keys to omit.
434
496
 
435
- > **picked**: `Partial`\<`T`\> \| `undefined`
497
+ ##### Returns
436
498
 
437
- ##### omitted
499
+ `Omit`\<`T`, `K`\> \| `undefined`
438
500
 
439
- > **omitted**: `Partial`\<`T`\> \| `undefined`
501
+ The object without the omitted keys, or undefined if the input was undefined.
440
502
 
441
503
  ***
442
504
 
443
- ### toExtended()
505
+ ### toExtended() {#toextended}
444
506
 
445
507
  > `static` **toExtended**(`obj`): `any`
446
508
 
@@ -462,7 +524,7 @@ The object with extended properties.
462
524
 
463
525
  ***
464
526
 
465
- ### fromExtended()
527
+ ### fromExtended() {#fromextended}
466
528
 
467
529
  > `static` **fromExtended**(`obj`): `any`
468
530
 
@@ -484,7 +546,7 @@ The object with regular properties.
484
546
 
485
547
  ***
486
548
 
487
- ### removeEmptyProperties()
549
+ ### removeEmptyProperties() {#removeemptyproperties}
488
550
 
489
551
  > `static` **removeEmptyProperties**\<`T`\>(`obj`, `options?`): `T`
490
552
 
@@ -12,9 +12,17 @@ Class to help with random generation.
12
12
 
13
13
  `RandomHelper`
14
14
 
15
+ ## Properties
16
+
17
+ ### CLASS\_NAME {#class_name}
18
+
19
+ > `readonly` `static` **CLASS\_NAME**: `string`
20
+
21
+ Runtime name for the class.
22
+
15
23
  ## Methods
16
24
 
17
- ### generate()
25
+ ### generate() {#generate}
18
26
 
19
27
  > `static` **generate**(`length`): `Uint8Array`
20
28
 
@@ -33,3 +41,47 @@ The length of buffer to create.
33
41
  `Uint8Array`
34
42
 
35
43
  The random array.
44
+
45
+ ***
46
+
47
+ ### generateUuidV7() {#generateuuidv7}
48
+
49
+ > `static` **generateUuidV7**(`format?`): `string`
50
+
51
+ Generate a new UUIDv7.
52
+
53
+ #### Parameters
54
+
55
+ ##### format?
56
+
57
+ `"standard"` \| `"compact"`
58
+
59
+ The format of the UUIDv7 string.
60
+
61
+ #### Returns
62
+
63
+ `string`
64
+
65
+ The UUIDv7 string.
66
+
67
+ ***
68
+
69
+ ### uuidV7ExtractTimestamp() {#uuidv7extracttimestamp}
70
+
71
+ > `static` **uuidV7ExtractTimestamp**(`uuid`): `number`
72
+
73
+ Extract the unix timestamp (ms) from a UUIDv7.
74
+
75
+ #### Parameters
76
+
77
+ ##### uuid
78
+
79
+ `string`
80
+
81
+ The UUIDv7 string.
82
+
83
+ #### Returns
84
+
85
+ `number`
86
+
87
+ The unix timestamp in milliseconds.
@@ -15,7 +15,7 @@ instance loads of a packages.
15
15
 
16
16
  ## Methods
17
17
 
18
- ### get()
18
+ ### get() {#get}
19
19
 
20
20
  > `static` **get**\<`T`\>(`prop`): `T` \| `undefined`
21
21
 
@@ -43,7 +43,7 @@ The property if it exists.
43
43
 
44
44
  ***
45
45
 
46
- ### set()
46
+ ### set() {#set}
47
47
 
48
48
  > `static` **set**\<`T`\>(`prop`, `value`): `void`
49
49
 
@@ -75,7 +75,7 @@ The value to set.
75
75
 
76
76
  ***
77
77
 
78
- ### remove()
78
+ ### remove() {#remove}
79
79
 
80
80
  > `static` **remove**(`prop`): `void`
81
81
 
@@ -14,7 +14,7 @@ Class to help with string.
14
14
 
15
15
  ## Methods
16
16
 
17
- ### trimTrailingSlashes()
17
+ ### trimTrailingSlashes() {#trimtrailingslashes}
18
18
 
19
19
  > `static` **trimTrailingSlashes**(`value`): `string`
20
20
 
@@ -36,7 +36,7 @@ The trimmed string or the original.
36
36
 
37
37
  ***
38
38
 
39
- ### trimLeadingSlashes()
39
+ ### trimLeadingSlashes() {#trimleadingslashes}
40
40
 
41
41
  > `static` **trimLeadingSlashes**(`value`): `string`
42
42
 
@@ -58,9 +58,31 @@ The trimmed string or the original.
58
58
 
59
59
  ***
60
60
 
61
- ### kebabCase()
61
+ ### trimLeadingAndTrailingSlashes() {#trimleadingandtrailingslashes}
62
62
 
63
- > `static` **kebabCase**(`input`, `stripInterfacePrefix`): `string`
63
+ > `static` **trimLeadingAndTrailingSlashes**(`value`): `string`
64
+
65
+ Trim both leading and trailing slashes from a string.
66
+
67
+ #### Parameters
68
+
69
+ ##### value
70
+
71
+ `string`
72
+
73
+ The value to trim.
74
+
75
+ #### Returns
76
+
77
+ `string`
78
+
79
+ The trimmed string or the original.
80
+
81
+ ***
82
+
83
+ ### kebabCase() {#kebabcase}
84
+
85
+ > `static` **kebabCase**(`input`, `stripInterfacePrefix?`): `string`
64
86
 
65
87
  Convert the input string to kebab case.
66
88
 
@@ -72,7 +94,7 @@ Convert the input string to kebab case.
72
94
 
73
95
  The input to convert.
74
96
 
75
- ##### stripInterfacePrefix
97
+ ##### stripInterfacePrefix?
76
98
 
77
99
  `boolean` = `true`
78
100
 
@@ -86,9 +108,9 @@ The kebab case version of the input.
86
108
 
87
109
  ***
88
110
 
89
- ### snakeCase()
111
+ ### snakeCase() {#snakecase}
90
112
 
91
- > `static` **snakeCase**(`input`, `stripInterfacePrefix`): `string`
113
+ > `static` **snakeCase**(`input`, `stripInterfacePrefix?`): `string`
92
114
 
93
115
  Convert the input string to snake case.
94
116
 
@@ -100,7 +122,7 @@ Convert the input string to snake case.
100
122
 
101
123
  The input to convert.
102
124
 
103
- ##### stripInterfacePrefix
125
+ ##### stripInterfacePrefix?
104
126
 
105
127
  `boolean` = `true`
106
128
 
@@ -114,9 +136,9 @@ The snake case version of the input.
114
136
 
115
137
  ***
116
138
 
117
- ### titleCase()
139
+ ### titleCase() {#titlecase}
118
140
 
119
- > `static` **titleCase**(`input`, `stripInterfacePrefix`): `string`
141
+ > `static` **titleCase**(`input`, `stripInterfacePrefix?`): `string`
120
142
 
121
143
  Title case all the words.
122
144
 
@@ -128,7 +150,7 @@ Title case all the words.
128
150
 
129
151
  The input to convert.
130
152
 
131
- ##### stripInterfacePrefix
153
+ ##### stripInterfacePrefix?
132
154
 
133
155
  `boolean` = `true`
134
156
 
@@ -142,9 +164,9 @@ The title case version of the input.
142
164
 
143
165
  ***
144
166
 
145
- ### pascalCase()
167
+ ### pascalCase() {#pascalcase}
146
168
 
147
- > `static` **pascalCase**(`input`, `stripInterfacePrefix`): `string`
169
+ > `static` **pascalCase**(`input`, `stripInterfacePrefix?`): `string`
148
170
 
149
171
  Pascal case all the words.
150
172
 
@@ -156,7 +178,7 @@ Pascal case all the words.
156
178
 
157
179
  The input to convert.
158
180
 
159
- ##### stripInterfacePrefix
181
+ ##### stripInterfacePrefix?
160
182
 
161
183
  `boolean` = `true`
162
184
 
@@ -170,9 +192,9 @@ The pascal case version of the input.
170
192
 
171
193
  ***
172
194
 
173
- ### camelCase()
195
+ ### camelCase() {#camelcase}
174
196
 
175
- > `static` **camelCase**(`input`, `stripInterfacePrefix`): `string`
197
+ > `static` **camelCase**(`input`, `stripInterfacePrefix?`): `string`
176
198
 
177
199
  Camel case all the words.
178
200
 
@@ -184,7 +206,7 @@ Camel case all the words.
184
206
 
185
207
  The input to convert.
186
208
 
187
- ##### stripInterfacePrefix
209
+ ##### stripInterfacePrefix?
188
210
 
189
211
  `boolean` = `true`
190
212
 
@@ -198,9 +220,9 @@ The camel case version of the input.
198
220
 
199
221
  ***
200
222
 
201
- ### wordPath()
223
+ ### wordPath() {#wordpath}
202
224
 
203
- > `static` **wordPath**(`input`, `stripInterfacePrefix`): `string`
225
+ > `static` **wordPath**(`input`, `stripInterfacePrefix?`): `string`
204
226
 
205
227
  Convert the words to a path.
206
228
 
@@ -212,7 +234,7 @@ Convert the words to a path.
212
234
 
213
235
  The input to convert.
214
236
 
215
- ##### stripInterfacePrefix
237
+ ##### stripInterfacePrefix?
216
238
 
217
239
  `boolean` = `true`
218
240
 
@@ -226,7 +248,7 @@ The path version of the input.
226
248
 
227
249
  ***
228
250
 
229
- ### stripPrefix()
251
+ ### stripPrefix() {#stripprefix}
230
252
 
231
253
  > `static` **stripPrefix**(`input`): `string`
232
254
 
@@ -248,7 +270,7 @@ The input with any interface prefix stripped.
248
270
 
249
271
  ***
250
272
 
251
- ### words()
273
+ ### words() {#words}
252
274
 
253
275
  > `static` **words**(`input`): `string`[]
254
276
 
@@ -270,7 +292,7 @@ The string split into words.
270
292
 
271
293
  ***
272
294
 
273
- ### isUtf8()
295
+ ### isUtf8() {#isutf8}
274
296
 
275
297
  > `static` **isUtf8**(`data`): `boolean`
276
298
 
@@ -14,7 +14,7 @@ Class to help with uint8 arrays.
14
14
 
15
15
  ## Methods
16
16
 
17
- ### concat()
17
+ ### concat() {#concat}
18
18
 
19
19
  > `static` **concat**(`arrays`): `Uint8Array`
20
20