@twin.org/core 0.0.2-next.8 → 0.0.2

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 (225) hide show
  1. package/README.md +1 -9
  2. package/dist/es/encoding/base32.js +75 -0
  3. package/dist/es/encoding/base32.js.map +1 -0
  4. package/dist/es/encoding/base58.js +124 -0
  5. package/dist/es/encoding/base58.js.map +1 -0
  6. package/dist/es/encoding/base64.js +231 -0
  7. package/dist/es/encoding/base64.js.map +1 -0
  8. package/dist/es/encoding/base64Url.js +42 -0
  9. package/dist/es/encoding/base64Url.js.map +1 -0
  10. package/dist/es/errors/alreadyExistsError.js +22 -0
  11. package/dist/es/errors/alreadyExistsError.js.map +1 -0
  12. package/dist/es/errors/baseError.js +257 -0
  13. package/dist/es/errors/baseError.js.map +1 -0
  14. package/dist/es/errors/conflictError.js +23 -0
  15. package/dist/es/errors/conflictError.js.map +1 -0
  16. package/dist/es/errors/generalError.js +21 -0
  17. package/dist/es/errors/generalError.js.map +1 -0
  18. package/dist/es/errors/guardError.js +27 -0
  19. package/dist/es/errors/guardError.js.map +1 -0
  20. package/dist/es/errors/notFoundError.js +22 -0
  21. package/dist/es/errors/notFoundError.js.map +1 -0
  22. package/dist/es/errors/notImplementedError.js +24 -0
  23. package/dist/es/errors/notImplementedError.js.map +1 -0
  24. package/dist/es/errors/notSupportedError.js +21 -0
  25. package/dist/es/errors/notSupportedError.js.map +1 -0
  26. package/dist/es/errors/unauthorizedError.js +21 -0
  27. package/dist/es/errors/unauthorizedError.js.map +1 -0
  28. package/dist/es/errors/unprocessableError.js +21 -0
  29. package/dist/es/errors/unprocessableError.js.map +1 -0
  30. package/dist/es/errors/validationError.js +23 -0
  31. package/dist/es/errors/validationError.js.map +1 -0
  32. package/dist/es/factories/componentFactory.js +9 -0
  33. package/dist/es/factories/componentFactory.js.map +1 -0
  34. package/dist/es/factories/factory.js +297 -0
  35. package/dist/es/factories/factory.js.map +1 -0
  36. package/dist/es/helpers/arrayHelper.js +46 -0
  37. package/dist/es/helpers/arrayHelper.js.map +1 -0
  38. package/dist/es/helpers/envHelper.js +39 -0
  39. package/dist/es/helpers/envHelper.js.map +1 -0
  40. package/dist/es/helpers/errorHelper.js +100 -0
  41. package/dist/es/helpers/errorHelper.js.map +1 -0
  42. package/dist/es/helpers/filenameHelper.js +32 -0
  43. package/dist/es/helpers/filenameHelper.js.map +1 -0
  44. package/dist/es/helpers/hexHelper.js +45 -0
  45. package/dist/es/helpers/hexHelper.js.map +1 -0
  46. package/dist/es/helpers/jsonHelper.js +163 -0
  47. package/dist/es/helpers/jsonHelper.js.map +1 -0
  48. package/dist/es/helpers/numberHelper.js +30 -0
  49. package/dist/es/helpers/numberHelper.js.map +1 -0
  50. package/dist/es/helpers/objectHelper.js +309 -0
  51. package/dist/es/helpers/objectHelper.js.map +1 -0
  52. package/dist/es/helpers/randomHelper.js +66 -0
  53. package/dist/es/helpers/randomHelper.js.map +1 -0
  54. package/dist/es/helpers/stringHelper.js +252 -0
  55. package/dist/es/helpers/stringHelper.js.map +1 -0
  56. package/dist/es/helpers/uint8ArrayHelper.js +26 -0
  57. package/dist/es/helpers/uint8ArrayHelper.js.map +1 -0
  58. package/dist/es/index.js +60 -0
  59. package/dist/es/index.js.map +1 -0
  60. package/dist/es/models/IComponent.js +2 -0
  61. package/dist/es/models/IComponent.js.map +1 -0
  62. package/dist/es/models/IError.js +4 -0
  63. package/dist/es/models/IError.js.map +1 -0
  64. package/dist/es/models/IHealth.js +2 -0
  65. package/dist/es/models/IHealth.js.map +1 -0
  66. package/dist/es/models/II18nShared.js +2 -0
  67. package/dist/es/models/II18nShared.js.map +1 -0
  68. package/dist/es/models/IKeyValue.js +2 -0
  69. package/dist/es/models/IKeyValue.js.map +1 -0
  70. package/dist/es/models/ILabelledValue.js +2 -0
  71. package/dist/es/models/ILabelledValue.js.map +1 -0
  72. package/dist/es/models/ILocale.js +2 -0
  73. package/dist/es/models/ILocale.js.map +1 -0
  74. package/dist/es/models/ILocaleDictionary.js +4 -0
  75. package/dist/es/models/ILocaleDictionary.js.map +1 -0
  76. package/dist/es/models/ILocalesIndex.js +2 -0
  77. package/dist/es/models/ILocalesIndex.js.map +1 -0
  78. package/dist/es/models/IPatchOperation.js +4 -0
  79. package/dist/es/models/IPatchOperation.js.map +1 -0
  80. package/dist/es/models/IUrlParts.js +4 -0
  81. package/dist/es/models/IUrlParts.js.map +1 -0
  82. package/dist/es/models/IValidationFailure.js +2 -0
  83. package/dist/es/models/IValidationFailure.js.map +1 -0
  84. package/dist/es/models/coerceType.js +49 -0
  85. package/dist/es/models/coerceType.js.map +1 -0
  86. package/dist/es/models/compressionType.js +17 -0
  87. package/dist/es/models/compressionType.js.map +1 -0
  88. package/dist/es/models/healthStatus.js +21 -0
  89. package/dist/es/models/healthStatus.js.map +1 -0
  90. package/dist/es/types/bitString.js +98 -0
  91. package/dist/es/types/bitString.js.map +1 -0
  92. package/dist/es/types/objectOrArray.js +2 -0
  93. package/dist/es/types/objectOrArray.js.map +1 -0
  94. package/dist/es/types/singleOccurrenceArray.js +2 -0
  95. package/dist/es/types/singleOccurrenceArray.js.map +1 -0
  96. package/dist/es/types/url.js +144 -0
  97. package/dist/es/types/url.js.map +1 -0
  98. package/dist/es/types/urn.js +211 -0
  99. package/dist/es/types/urn.js.map +1 -0
  100. package/dist/es/utils/asyncCache.js +206 -0
  101. package/dist/es/utils/asyncCache.js.map +1 -0
  102. package/dist/es/utils/coerce.js +269 -0
  103. package/dist/es/utils/coerce.js.map +1 -0
  104. package/dist/es/utils/compression.js +49 -0
  105. package/dist/es/utils/compression.js.map +1 -0
  106. package/dist/es/utils/converter.js +256 -0
  107. package/dist/es/utils/converter.js.map +1 -0
  108. package/dist/es/utils/guards.js +385 -0
  109. package/dist/es/utils/guards.js.map +1 -0
  110. package/dist/es/utils/i18n.js +243 -0
  111. package/dist/es/utils/i18n.js.map +1 -0
  112. package/dist/es/utils/is.js +367 -0
  113. package/dist/es/utils/is.js.map +1 -0
  114. package/dist/es/utils/sharedStore.js +48 -0
  115. package/dist/es/utils/sharedStore.js.map +1 -0
  116. package/dist/es/utils/validation.js +774 -0
  117. package/dist/es/utils/validation.js.map +1 -0
  118. package/dist/types/encoding/base32.d.ts +5 -1
  119. package/dist/types/encoding/base58.d.ts +4 -0
  120. package/dist/types/encoding/base64.d.ts +4 -0
  121. package/dist/types/encoding/base64Url.d.ts +4 -0
  122. package/dist/types/errors/alreadyExistsError.d.ts +6 -3
  123. package/dist/types/errors/baseError.d.ts +2 -2
  124. package/dist/types/errors/conflictError.d.ts +6 -3
  125. package/dist/types/errors/generalError.d.ts +2 -2
  126. package/dist/types/errors/guardError.d.ts +2 -2
  127. package/dist/types/errors/notFoundError.d.ts +6 -3
  128. package/dist/types/errors/notImplementedError.d.ts +6 -2
  129. package/dist/types/errors/notSupportedError.d.ts +6 -3
  130. package/dist/types/errors/unauthorizedError.d.ts +7 -4
  131. package/dist/types/errors/unprocessableError.d.ts +2 -2
  132. package/dist/types/errors/validationError.d.ts +2 -2
  133. package/dist/types/factories/componentFactory.d.ts +2 -2
  134. package/dist/types/factories/factory.d.ts +27 -1
  135. package/dist/types/helpers/arrayHelper.d.ts +1 -8
  136. package/dist/types/helpers/errorHelper.d.ts +1 -1
  137. package/dist/types/helpers/jsonHelper.d.ts +5 -1
  138. package/dist/types/helpers/numberHelper.d.ts +17 -0
  139. package/dist/types/helpers/objectHelper.d.ts +24 -6
  140. package/dist/types/helpers/randomHelper.d.ts +16 -0
  141. package/dist/types/helpers/stringHelper.d.ts +12 -6
  142. package/dist/types/index.d.ts +57 -53
  143. package/dist/types/models/IComponent.d.ts +18 -7
  144. package/dist/types/models/IError.d.ts +1 -1
  145. package/dist/types/models/IHealth.d.ts +32 -0
  146. package/dist/types/models/ILocalesIndex.d.ts +1 -1
  147. package/dist/types/models/IValidationFailure.d.ts +0 -4
  148. package/dist/types/models/healthStatus.d.ts +21 -0
  149. package/dist/types/types/bitString.d.ts +4 -0
  150. package/dist/types/types/singleOccurrenceArray.d.ts +9 -0
  151. package/dist/types/types/url.d.ts +8 -3
  152. package/dist/types/types/urn.d.ts +7 -2
  153. package/dist/types/utils/asyncCache.d.ts +7 -0
  154. package/dist/types/utils/coerce.d.ts +1 -1
  155. package/dist/types/utils/compression.d.ts +5 -1
  156. package/dist/types/utils/guards.d.ts +11 -3
  157. package/dist/types/utils/i18n.d.ts +16 -1
  158. package/dist/types/utils/is.d.ts +8 -1
  159. package/dist/types/utils/validation.d.ts +1 -1
  160. package/docs/changelog.md +1240 -130
  161. package/docs/examples.md +308 -1
  162. package/docs/reference/classes/AlreadyExistsError.md +43 -39
  163. package/docs/reference/classes/ArrayHelper.md +10 -44
  164. package/docs/reference/classes/AsyncCache.md +12 -12
  165. package/docs/reference/classes/Base32.md +11 -3
  166. package/docs/reference/classes/Base58.md +10 -2
  167. package/docs/reference/classes/Base64.md +11 -3
  168. package/docs/reference/classes/Base64Url.md +10 -2
  169. package/docs/reference/classes/BaseError.md +37 -37
  170. package/docs/reference/classes/BitString.md +13 -5
  171. package/docs/reference/classes/Coerce.md +31 -31
  172. package/docs/reference/classes/Compression.md +10 -2
  173. package/docs/reference/classes/ConflictError.md +43 -39
  174. package/docs/reference/classes/Converter.md +18 -18
  175. package/docs/reference/classes/EnvHelper.md +1 -1
  176. package/docs/reference/classes/ErrorHelper.md +5 -5
  177. package/docs/reference/classes/Factory.md +122 -20
  178. package/docs/reference/classes/FilenameHelper.md +1 -1
  179. package/docs/reference/classes/GeneralError.md +38 -38
  180. package/docs/reference/classes/GuardError.md +38 -38
  181. package/docs/reference/classes/Guards.md +80 -34
  182. package/docs/reference/classes/HexHelper.md +6 -6
  183. package/docs/reference/classes/I18n.md +66 -14
  184. package/docs/reference/classes/Is.md +77 -43
  185. package/docs/reference/classes/JsonHelper.md +17 -9
  186. package/docs/reference/classes/NotFoundError.md +43 -39
  187. package/docs/reference/classes/NotImplementedError.md +48 -38
  188. package/docs/reference/classes/NotSupportedError.md +43 -39
  189. package/docs/reference/classes/NumberHelper.md +55 -0
  190. package/docs/reference/classes/ObjectHelper.md +163 -51
  191. package/docs/reference/classes/RandomHelper.md +53 -1
  192. package/docs/reference/classes/SharedStore.md +5 -5
  193. package/docs/reference/classes/StringHelper.md +52 -30
  194. package/docs/reference/classes/Uint8ArrayHelper.md +1 -1
  195. package/docs/reference/classes/UnauthorizedError.md +44 -40
  196. package/docs/reference/classes/UnprocessableError.md +38 -38
  197. package/docs/reference/classes/Url.md +24 -10
  198. package/docs/reference/classes/Urn.md +42 -28
  199. package/docs/reference/classes/Validation.md +27 -27
  200. package/docs/reference/classes/ValidationError.md +37 -37
  201. package/docs/reference/index.md +6 -0
  202. package/docs/reference/interfaces/IComponent.md +57 -27
  203. package/docs/reference/interfaces/IError.md +11 -11
  204. package/docs/reference/interfaces/IHealth.md +55 -0
  205. package/docs/reference/interfaces/II18nShared.md +4 -4
  206. package/docs/reference/interfaces/IKeyValue.md +2 -2
  207. package/docs/reference/interfaces/ILabelledValue.md +2 -2
  208. package/docs/reference/interfaces/ILocale.md +2 -2
  209. package/docs/reference/interfaces/ILocaleDictionary.md +1 -1
  210. package/docs/reference/interfaces/ILocalesIndex.md +1 -1
  211. package/docs/reference/interfaces/IPatchOperation.md +6 -6
  212. package/docs/reference/interfaces/IUrlParts.md +9 -9
  213. package/docs/reference/interfaces/IValidationFailure.md +4 -12
  214. package/docs/reference/type-aliases/HealthStatus.md +5 -0
  215. package/docs/reference/type-aliases/SingleOccurrenceArray.md +15 -0
  216. package/docs/reference/type-aliases/SingleOccurrenceArrayDepthHelper.md +19 -0
  217. package/docs/reference/variables/CoerceType.md +10 -10
  218. package/docs/reference/variables/CompressionType.md +2 -2
  219. package/docs/reference/variables/HealthStatus.md +25 -0
  220. package/locales/.validate-ignore +1 -0
  221. package/locales/en.json +9 -7
  222. package/package.json +24 -12
  223. package/dist/cjs/index.cjs +0 -5175
  224. package/dist/esm/index.mjs +0 -5133
  225. /package/dist/types/{models → types}/objectOrArray.d.ts +0 -0
@@ -26,7 +26,7 @@ The source of the error.
26
26
 
27
27
  `string`
28
28
 
29
- The message as a code.
29
+ The message as an i18n key.
30
30
 
31
31
  ##### propertyName
32
32
 
@@ -56,9 +56,9 @@ The property options which might be allowed.
56
56
 
57
57
  ## Properties
58
58
 
59
- ### source?
59
+ ### source? {#source}
60
60
 
61
- > `optional` **source**: `string`
61
+ > `optional` **source?**: `string`
62
62
 
63
63
  The source of the error.
64
64
 
@@ -68,9 +68,9 @@ The source of the error.
68
68
 
69
69
  ***
70
70
 
71
- ### properties?
71
+ ### properties? {#properties}
72
72
 
73
- > `optional` **properties**: `object`
73
+ > `optional` **properties?**: `object`
74
74
 
75
75
  Any additional information for the error.
76
76
 
@@ -84,9 +84,9 @@ Any additional information for the error.
84
84
 
85
85
  ***
86
86
 
87
- ### cause?
87
+ ### cause? {#cause}
88
88
 
89
- > `optional` **cause**: [`IError`](../interfaces/IError.md)
89
+ > `optional` **cause?**: [`IError`](../interfaces/IError.md)
90
90
 
91
91
  The cause of the error.
92
92
 
@@ -96,7 +96,7 @@ The cause of the error.
96
96
 
97
97
  ***
98
98
 
99
- ### CLASS\_NAME
99
+ ### CLASS\_NAME {#class_name}
100
100
 
101
101
  > `readonly` `static` **CLASS\_NAME**: `string`
102
102
 
@@ -104,7 +104,7 @@ Runtime name for the class.
104
104
 
105
105
  ## Methods
106
106
 
107
- ### fromError()
107
+ ### fromError() {#fromerror}
108
108
 
109
109
  > `static` **fromError**(`err`): [`BaseError`](BaseError.md)
110
110
 
@@ -130,7 +130,7 @@ The new instance.
130
130
 
131
131
  ***
132
132
 
133
- ### flatten()
133
+ ### flatten() {#flatten}
134
134
 
135
135
  > `static` **flatten**(`err`): [`IError`](../interfaces/IError.md)[]
136
136
 
@@ -156,9 +156,9 @@ The list of all internal errors.
156
156
 
157
157
  ***
158
158
 
159
- ### expand()
159
+ ### expand() {#expand}
160
160
 
161
- > `static` **expand**(`errors`): `undefined` \| [`IError`](../interfaces/IError.md)
161
+ > `static` **expand**(`errors`): [`IError`](../interfaces/IError.md) \| `undefined`
162
162
 
163
163
  Expand an error tree.
164
164
 
@@ -166,13 +166,13 @@ Expand an error tree.
166
166
 
167
167
  ##### errors
168
168
 
169
- The list of errors to expand.
169
+ [`IError`](../interfaces/IError.md)[] \| `undefined`
170
170
 
171
- `undefined` | [`IError`](../interfaces/IError.md)[]
171
+ The list of errors to expand.
172
172
 
173
173
  #### Returns
174
174
 
175
- `undefined` \| [`IError`](../interfaces/IError.md)
175
+ [`IError`](../interfaces/IError.md) \| `undefined`
176
176
 
177
177
  The first level error.
178
178
 
@@ -182,7 +182,7 @@ The first level error.
182
182
 
183
183
  ***
184
184
 
185
- ### isErrorName()
185
+ ### isErrorName() {#iserrorname}
186
186
 
187
187
  > `static` **isErrorName**(`error`, `name`): `error is BaseError`
188
188
 
@@ -198,9 +198,9 @@ The error to test.
198
198
 
199
199
  ##### name
200
200
 
201
- The name to check for.
201
+ `string` \| `RegExp`
202
202
 
203
- `string` | `RegExp`
203
+ The name to check for.
204
204
 
205
205
  #### Returns
206
206
 
@@ -214,7 +214,7 @@ True if the error has the name.
214
214
 
215
215
  ***
216
216
 
217
- ### isErrorMessage()
217
+ ### isErrorMessage() {#iserrormessage}
218
218
 
219
219
  > `static` **isErrorMessage**(`error`, `message`): `error is BaseError`
220
220
 
@@ -230,9 +230,9 @@ The error to test.
230
230
 
231
231
  ##### message
232
232
 
233
- The message to check for.
233
+ `string` \| `RegExp`
234
234
 
235
- `string` | `RegExp`
235
+ The message to check for.
236
236
 
237
237
  #### Returns
238
238
 
@@ -246,7 +246,7 @@ True if the error has the name.
246
246
 
247
247
  ***
248
248
 
249
- ### isErrorCode()
249
+ ### isErrorCode() {#iserrorcode}
250
250
 
251
251
  > `static` **isErrorCode**(`error`, `code`): `boolean`
252
252
 
@@ -262,9 +262,9 @@ The error to test.
262
262
 
263
263
  ##### code
264
264
 
265
- The code to check for.
265
+ `string` \| `RegExp`
266
266
 
267
- `string` | `RegExp`
267
+ The code to check for.
268
268
 
269
269
  #### Returns
270
270
 
@@ -278,7 +278,7 @@ True if the error has the code.
278
278
 
279
279
  ***
280
280
 
281
- ### someErrorName()
281
+ ### someErrorName() {#someerrorname}
282
282
 
283
283
  > `static` **someErrorName**(`error`, `name`): `error is BaseError`
284
284
 
@@ -294,9 +294,9 @@ The error to test.
294
294
 
295
295
  ##### name
296
296
 
297
- The name to check for.
297
+ `string` \| `RegExp`
298
298
 
299
- `string` | `RegExp`
299
+ The name to check for.
300
300
 
301
301
  #### Returns
302
302
 
@@ -310,7 +310,7 @@ True if the error has the name.
310
310
 
311
311
  ***
312
312
 
313
- ### someErrorMessage()
313
+ ### someErrorMessage() {#someerrormessage}
314
314
 
315
315
  > `static` **someErrorMessage**(`error`, `message`): `error is BaseError`
316
316
 
@@ -326,9 +326,9 @@ The error to test.
326
326
 
327
327
  ##### message
328
328
 
329
- The message to check for.
329
+ `string` \| `RegExp`
330
330
 
331
- `string` | `RegExp`
331
+ The message to check for.
332
332
 
333
333
  #### Returns
334
334
 
@@ -342,7 +342,7 @@ True if the error has the name.
342
342
 
343
343
  ***
344
344
 
345
- ### someErrorClass()
345
+ ### someErrorClass() {#someerrorclass}
346
346
 
347
347
  > `static` **someErrorClass**(`error`, `cls`): `error is BaseError`
348
348
 
@@ -374,7 +374,7 @@ True if the error has the specific class.
374
374
 
375
375
  ***
376
376
 
377
- ### someErrorCode()
377
+ ### someErrorCode() {#someerrorcode}
378
378
 
379
379
  > `static` **someErrorCode**(`error`, `code`): `error is BaseError`
380
380
 
@@ -390,9 +390,9 @@ The error to test.
390
390
 
391
391
  ##### code
392
392
 
393
- The code to check for.
393
+ `string` \| `RegExp`
394
394
 
395
- `string` | `RegExp`
395
+ The code to check for.
396
396
 
397
397
  #### Returns
398
398
 
@@ -406,7 +406,7 @@ True if the error has the name.
406
406
 
407
407
  ***
408
408
 
409
- ### isEmpty()
409
+ ### isEmpty() {#isempty}
410
410
 
411
411
  > `static` **isEmpty**(`err`): `boolean`
412
412
 
@@ -432,7 +432,7 @@ True if the error is empty.
432
432
 
433
433
  ***
434
434
 
435
- ### isAggregateError()
435
+ ### isAggregateError() {#isaggregateerror}
436
436
 
437
437
  > `static` **isAggregateError**(`err`): `err is AggregateError`
438
438
 
@@ -458,7 +458,7 @@ True if the error is an aggregate error.
458
458
 
459
459
  ***
460
460
 
461
- ### fromAggregate()
461
+ ### fromAggregate() {#fromaggregate}
462
462
 
463
463
  > `static` **fromAggregate**(`err`, `includeStackTrace?`): [`IError`](../interfaces/IError.md)[]
464
464
 
@@ -490,7 +490,7 @@ The array of errors.
490
490
 
491
491
  ***
492
492
 
493
- ### toJsonObject()
493
+ ### toJsonObject() {#tojsonobject}
494
494
 
495
495
  > **toJsonObject**(`includeStackTrace?`): [`IError`](../interfaces/IError.md)
496
496
 
@@ -14,7 +14,7 @@ Class to handle guard operations for parameters.
14
14
 
15
15
  ## Methods
16
16
 
17
- ### defined()
17
+ ### defined() {#defined}
18
18
 
19
19
  > `static` **defined**(`source`, `property`, `value`): `asserts value`
20
20
 
@@ -50,7 +50,7 @@ GuardError If the value does not match the assertion.
50
50
 
51
51
  ***
52
52
 
53
- ### string()
53
+ ### string() {#string}
54
54
 
55
55
  > `static` **string**(`source`, `property`, `value`): `asserts value is string`
56
56
 
@@ -86,7 +86,7 @@ GuardError If the value does not match the assertion.
86
86
 
87
87
  ***
88
88
 
89
- ### stringValue()
89
+ ### stringValue() {#stringvalue}
90
90
 
91
91
  > `static` **stringValue**(`source`, `property`, `value`): `asserts value is string`
92
92
 
@@ -122,7 +122,7 @@ GuardError If the value does not match the assertion.
122
122
 
123
123
  ***
124
124
 
125
- ### json()
125
+ ### json() {#json}
126
126
 
127
127
  > `static` **json**(`source`, `property`, `value`): `asserts value is string`
128
128
 
@@ -158,7 +158,7 @@ GuardError If the value does not match the assertion.
158
158
 
159
159
  ***
160
160
 
161
- ### stringBase64()
161
+ ### stringBase64() {#stringbase64}
162
162
 
163
163
  > `static` **stringBase64**(`source`, `property`, `value`): `asserts value is string`
164
164
 
@@ -194,7 +194,7 @@ GuardError If the value does not match the assertion.
194
194
 
195
195
  ***
196
196
 
197
- ### stringBase64Url()
197
+ ### stringBase64Url() {#stringbase64url}
198
198
 
199
199
  > `static` **stringBase64Url**(`source`, `property`, `value`): `asserts value is string`
200
200
 
@@ -230,7 +230,7 @@ GuardError If the value does not match the assertion.
230
230
 
231
231
  ***
232
232
 
233
- ### stringBase58()
233
+ ### stringBase58() {#stringbase58}
234
234
 
235
235
  > `static` **stringBase58**(`source`, `property`, `value`): `asserts value is string`
236
236
 
@@ -266,9 +266,9 @@ GuardError If the value does not match the assertion.
266
266
 
267
267
  ***
268
268
 
269
- ### stringHex()
269
+ ### stringHex() {#stringhex}
270
270
 
271
- > `static` **stringHex**(`source`, `property`, `value`, `allowPrefix`): `asserts value is string`
271
+ > `static` **stringHex**(`source`, `property`, `value`, `allowPrefix?`): `asserts value is string`
272
272
 
273
273
  Is the property a string with a hex value.
274
274
 
@@ -292,7 +292,7 @@ The name of the property.
292
292
 
293
293
  The value to test.
294
294
 
295
- ##### allowPrefix
295
+ ##### allowPrefix?
296
296
 
297
297
  `boolean` = `false`
298
298
 
@@ -308,9 +308,9 @@ GuardError If the value does not match the assertion.
308
308
 
309
309
  ***
310
310
 
311
- ### stringHexLength()
311
+ ### stringHexLength() {#stringhexlength}
312
312
 
313
- > `static` **stringHexLength**(`source`, `property`, `value`, `length`, `allowPrefix`): `asserts value is string`
313
+ > `static` **stringHexLength**(`source`, `property`, `value`, `length`, `allowPrefix?`): `asserts value is string`
314
314
 
315
315
  Is the property a string with a hex value with fixed length.
316
316
 
@@ -340,7 +340,7 @@ The value to test.
340
340
 
341
341
  The length of the string to match.
342
342
 
343
- ##### allowPrefix
343
+ ##### allowPrefix?
344
344
 
345
345
  `boolean` = `false`
346
346
 
@@ -356,7 +356,7 @@ GuardError If the value does not match the assertion.
356
356
 
357
357
  ***
358
358
 
359
- ### number()
359
+ ### number() {#number}
360
360
 
361
361
  > `static` **number**(`source`, `property`, `value`): `asserts value is number`
362
362
 
@@ -392,7 +392,7 @@ GuardError If the value does not match the assertion.
392
392
 
393
393
  ***
394
394
 
395
- ### integer()
395
+ ### integer() {#integer}
396
396
 
397
397
  > `static` **integer**(`source`, `property`, `value`): `asserts value is number`
398
398
 
@@ -428,7 +428,7 @@ GuardError If the value does not match the assertion.
428
428
 
429
429
  ***
430
430
 
431
- ### bigint()
431
+ ### bigint() {#bigint}
432
432
 
433
433
  > `static` **bigint**(`source`, `property`, `value`): `asserts value is bigint`
434
434
 
@@ -464,7 +464,7 @@ GuardError If the value does not match the assertion.
464
464
 
465
465
  ***
466
466
 
467
- ### boolean()
467
+ ### boolean() {#boolean}
468
468
 
469
469
  > `static` **boolean**(`source`, `property`, `value`): `asserts value is boolean`
470
470
 
@@ -500,7 +500,7 @@ GuardError If the value does not match the assertion.
500
500
 
501
501
  ***
502
502
 
503
- ### date()
503
+ ### date() {#date}
504
504
 
505
505
  > `static` **date**(`source`, `property`, `value`): `asserts value is Date`
506
506
 
@@ -536,7 +536,7 @@ GuardError If the value does not match the assertion.
536
536
 
537
537
  ***
538
538
 
539
- ### timestampMilliseconds()
539
+ ### timestampMilliseconds() {#timestampmilliseconds}
540
540
 
541
541
  > `static` **timestampMilliseconds**(`source`, `property`, `value`): `asserts value is number`
542
542
 
@@ -572,7 +572,7 @@ GuardError If the value does not match the assertion.
572
572
 
573
573
  ***
574
574
 
575
- ### timestampSeconds()
575
+ ### timestampSeconds() {#timestampseconds}
576
576
 
577
577
  > `static` **timestampSeconds**(`source`, `property`, `value`): `asserts value is number`
578
578
 
@@ -608,7 +608,7 @@ GuardError If the value does not match the assertion.
608
608
 
609
609
  ***
610
610
 
611
- ### object()
611
+ ### object() {#object}
612
612
 
613
613
  > `static` **object**\<`T`\>(`source`, `property`, `value`): `asserts value is T`
614
614
 
@@ -650,7 +650,7 @@ GuardError If the value does not match the assertion.
650
650
 
651
651
  ***
652
652
 
653
- ### objectValue()
653
+ ### objectValue() {#objectvalue}
654
654
 
655
655
  > `static` **objectValue**\<`T`\>(`source`, `property`, `value`): `asserts value is T`
656
656
 
@@ -692,7 +692,7 @@ GuardError If the value does not match the assertion.
692
692
 
693
693
  ***
694
694
 
695
- ### array()
695
+ ### array() {#array}
696
696
 
697
697
  > `static` **array**\<`T`\>(`source`, `property`, `value`): `asserts value is T[]`
698
698
 
@@ -734,7 +734,7 @@ GuardError If the value does not match the assertion.
734
734
 
735
735
  ***
736
736
 
737
- ### arrayValue()
737
+ ### arrayValue() {#arrayvalue}
738
738
 
739
739
  > `static` **arrayValue**\<`T`\>(`source`, `property`, `value`): `asserts value is T[]`
740
740
 
@@ -776,7 +776,7 @@ GuardError If the value does not match the assertion.
776
776
 
777
777
  ***
778
778
 
779
- ### arrayOneOf()
779
+ ### arrayOneOf() {#arrayoneof}
780
780
 
781
781
  > `static` **arrayOneOf**\<`T`\>(`source`, `property`, `value`, `options`): `asserts value is T`
782
782
 
@@ -824,7 +824,7 @@ GuardError If the value does not match the assertion.
824
824
 
825
825
  ***
826
826
 
827
- ### arrayStartsWith()
827
+ ### arrayStartsWith() {#arraystartswith}
828
828
 
829
829
  > `static` **arrayStartsWith**\<`T`\>(`source`, `property`, `value`, `startValues`): `asserts value is T[]`
830
830
 
@@ -872,7 +872,7 @@ GuardError If the value does not match the assertion.
872
872
 
873
873
  ***
874
874
 
875
- ### arrayEndsWith()
875
+ ### arrayEndsWith() {#arrayendswith}
876
876
 
877
877
  > `static` **arrayEndsWith**\<`T`\>(`source`, `property`, `value`, `endValues`): `asserts value is T[]`
878
878
 
@@ -920,7 +920,7 @@ GuardError If the value does not match the assertion.
920
920
 
921
921
  ***
922
922
 
923
- ### uint8Array()
923
+ ### uint8Array() {#uint8array}
924
924
 
925
925
  > `static` **uint8Array**(`source`, `property`, `value`): `asserts value is Uint8Array<ArrayBufferLike>`
926
926
 
@@ -956,12 +956,18 @@ GuardError If the value does not match the assertion.
956
956
 
957
957
  ***
958
958
 
959
- ### function()
959
+ ### function() {#function}
960
960
 
961
- > `static` **function**(`source`, `property`, `value`): `boolean`
961
+ > `static` **function**\<`T`\>(`source`, `property`, `value`): `asserts value is T`
962
962
 
963
963
  Is the property a function.
964
964
 
965
+ #### Type Parameters
966
+
967
+ ##### T
968
+
969
+ `T` *extends* (...`args`) => `any` = (...`args`) => `any`
970
+
965
971
  #### Parameters
966
972
 
967
973
  ##### source
@@ -984,9 +990,7 @@ The value to test.
984
990
 
985
991
  #### Returns
986
992
 
987
- `boolean`
988
-
989
- True if the value is a function.
993
+ `asserts value is T`
990
994
 
991
995
  #### Throws
992
996
 
@@ -994,7 +998,7 @@ GuardError If the value does not match the assertion.
994
998
 
995
999
  ***
996
1000
 
997
- ### email()
1001
+ ### email() {#email}
998
1002
 
999
1003
  > `static` **email**(`source`, `property`, `value`): `asserts value is string`
1000
1004
 
@@ -1027,3 +1031,45 @@ The value to test.
1027
1031
  #### Throws
1028
1032
 
1029
1033
  GuardError If the value does not match the assertion.
1034
+
1035
+ ***
1036
+
1037
+ ### uuidV7() {#uuidv7}
1038
+
1039
+ > `static` **uuidV7**(`source`, `property`, `value`, `format?`): `asserts value is string`
1040
+
1041
+ Is the property a string containing uuidV7.
1042
+
1043
+ #### Parameters
1044
+
1045
+ ##### source
1046
+
1047
+ `string`
1048
+
1049
+ The source of the error.
1050
+
1051
+ ##### property
1052
+
1053
+ `string`
1054
+
1055
+ The name of the property.
1056
+
1057
+ ##### value
1058
+
1059
+ `unknown`
1060
+
1061
+ The value to test.
1062
+
1063
+ ##### format?
1064
+
1065
+ `"standard"` \| `"compact"`
1066
+
1067
+ The format of the uuidV7, either standard or compact.
1068
+
1069
+ #### Returns
1070
+
1071
+ `asserts value is string`
1072
+
1073
+ #### Throws
1074
+
1075
+ GuardError If the value does not match the assertion.
@@ -14,7 +14,7 @@ Helper methods for hex conversions.
14
14
 
15
15
  ## Methods
16
16
 
17
- ### stripPrefix()
17
+ ### stripPrefix() {#stripprefix}
18
18
 
19
19
  > `static` **stripPrefix**(`hex`): `string`
20
20
 
@@ -36,7 +36,7 @@ The stripped hex without the prefix.
36
36
 
37
37
  ***
38
38
 
39
- ### addPrefix()
39
+ ### addPrefix() {#addprefix}
40
40
 
41
41
  > `static` **addPrefix**(`hex`): `string`
42
42
 
@@ -58,7 +58,7 @@ The hex with the prefix.
58
58
 
59
59
  ***
60
60
 
61
- ### hasPrefix()
61
+ ### hasPrefix() {#hasprefix}
62
62
 
63
63
  > `static` **hasPrefix**(`hex`): `boolean`
64
64
 
@@ -80,9 +80,9 @@ True if the hex string has the prefix.
80
80
 
81
81
  ***
82
82
 
83
- ### isHex()
83
+ ### isHex() {#ishex}
84
84
 
85
- > `static` **isHex**(`value`, `allowPrefix`): `boolean`
85
+ > `static` **isHex**(`value`, `allowPrefix?`): `boolean`
86
86
 
87
87
  Is the data hex format.
88
88
 
@@ -94,7 +94,7 @@ Is the data hex format.
94
94
 
95
95
  The value to test.
96
96
 
97
- ##### allowPrefix
97
+ ##### allowPrefix?
98
98
 
99
99
  `boolean` = `false`
100
100