@twin.org/core 0.0.3-next.21 → 0.0.3-next.23
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/README.md +1 -9
- package/dist/es/encoding/base32.js +1 -1
- package/dist/es/encoding/base32.js.map +1 -1
- package/dist/es/factories/factory.js +1 -13
- package/dist/es/factories/factory.js.map +1 -1
- package/dist/es/helpers/arrayHelper.js.map +1 -1
- package/dist/es/index.js +2 -1
- package/dist/es/index.js.map +1 -1
- package/dist/es/types/objectOrArray.js.map +1 -0
- package/dist/es/types/singleOccurrenceArray.js +2 -0
- package/dist/es/types/singleOccurrenceArray.js.map +1 -0
- package/dist/es/utils/guards.js.map +1 -1
- package/dist/types/encoding/base32.d.ts +1 -1
- package/dist/types/factories/factory.d.ts +1 -5
- package/dist/types/helpers/arrayHelper.d.ts +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/types/singleOccurrenceArray.d.ts +9 -0
- package/dist/types/utils/guards.d.ts +1 -1
- package/docs/changelog.md +36 -1
- package/docs/examples.md +308 -1
- package/docs/reference/classes/AlreadyExistsError.md +18 -18
- package/docs/reference/classes/ArrayHelper.md +2 -2
- package/docs/reference/classes/AsyncCache.md +6 -6
- package/docs/reference/classes/Base32.md +4 -4
- package/docs/reference/classes/Base58.md +3 -3
- package/docs/reference/classes/Base64.md +4 -4
- package/docs/reference/classes/Base64Url.md +3 -3
- package/docs/reference/classes/BaseError.md +17 -17
- package/docs/reference/classes/BitString.md +6 -6
- package/docs/reference/classes/Coerce.md +11 -11
- package/docs/reference/classes/Compression.md +3 -3
- package/docs/reference/classes/ConflictError.md +18 -18
- package/docs/reference/classes/Converter.md +18 -18
- package/docs/reference/classes/EnvHelper.md +1 -1
- package/docs/reference/classes/ErrorHelper.md +3 -3
- package/docs/reference/classes/Factory.md +21 -31
- package/docs/reference/classes/FilenameHelper.md +1 -1
- package/docs/reference/classes/GeneralError.md +18 -18
- package/docs/reference/classes/GuardError.md +18 -18
- package/docs/reference/classes/Guards.md +31 -31
- package/docs/reference/classes/HexHelper.md +6 -6
- package/docs/reference/classes/I18n.md +14 -14
- package/docs/reference/classes/Is.md +40 -40
- package/docs/reference/classes/JsonHelper.md +8 -8
- package/docs/reference/classes/NotFoundError.md +18 -18
- package/docs/reference/classes/NotImplementedError.md +18 -18
- package/docs/reference/classes/NotSupportedError.md +18 -18
- package/docs/reference/classes/NumberHelper.md +2 -2
- package/docs/reference/classes/ObjectHelper.md +20 -20
- package/docs/reference/classes/RandomHelper.md +6 -6
- package/docs/reference/classes/SharedStore.md +3 -3
- package/docs/reference/classes/StringHelper.md +23 -23
- package/docs/reference/classes/Uint8ArrayHelper.md +1 -1
- package/docs/reference/classes/UnauthorizedError.md +18 -18
- package/docs/reference/classes/UnprocessableError.md +18 -18
- package/docs/reference/classes/Url.md +8 -8
- package/docs/reference/classes/Urn.md +22 -22
- package/docs/reference/classes/Validation.md +25 -25
- package/docs/reference/classes/ValidationError.md +18 -18
- package/docs/reference/index.md +2 -0
- package/docs/reference/interfaces/IComponent.md +4 -4
- package/docs/reference/interfaces/IError.md +6 -6
- package/docs/reference/interfaces/II18nShared.md +4 -4
- package/docs/reference/interfaces/IKeyValue.md +2 -2
- package/docs/reference/interfaces/ILabelledValue.md +2 -2
- package/docs/reference/interfaces/ILocale.md +2 -2
- package/docs/reference/interfaces/ILocalesIndex.md +1 -1
- package/docs/reference/interfaces/IPatchOperation.md +4 -4
- package/docs/reference/interfaces/IUrlParts.md +6 -6
- package/docs/reference/interfaces/IValidationFailure.md +3 -3
- package/docs/reference/type-aliases/SingleOccurrenceArray.md +15 -0
- package/docs/reference/type-aliases/SingleOccurrenceArrayDepthHelper.md +19 -0
- package/docs/reference/variables/CoerceType.md +10 -10
- package/docs/reference/variables/CompressionType.md +2 -2
- package/package.json +4 -4
- package/dist/es/models/objectOrArray.js.map +0 -1
- /package/dist/es/{models → types}/objectOrArray.js +0 -0
- /package/dist/types/{models → types}/objectOrArray.d.ts +0 -0
|
@@ -71,7 +71,7 @@ The cause of error if we have wrapped another error.
|
|
|
71
71
|
|
|
72
72
|
## Properties
|
|
73
73
|
|
|
74
|
-
### source?
|
|
74
|
+
### source? {#source}
|
|
75
75
|
|
|
76
76
|
> `optional` **source**: `string`
|
|
77
77
|
|
|
@@ -83,7 +83,7 @@ The source of the error.
|
|
|
83
83
|
|
|
84
84
|
***
|
|
85
85
|
|
|
86
|
-
### properties?
|
|
86
|
+
### properties? {#properties}
|
|
87
87
|
|
|
88
88
|
> `optional` **properties**: `object`
|
|
89
89
|
|
|
@@ -99,7 +99,7 @@ Any additional information for the error.
|
|
|
99
99
|
|
|
100
100
|
***
|
|
101
101
|
|
|
102
|
-
### cause?
|
|
102
|
+
### cause? {#cause}
|
|
103
103
|
|
|
104
104
|
> `optional` **cause**: [`IError`](../interfaces/IError.md)
|
|
105
105
|
|
|
@@ -115,7 +115,7 @@ The cause of the error.
|
|
|
115
115
|
|
|
116
116
|
## Methods
|
|
117
117
|
|
|
118
|
-
### fromError()
|
|
118
|
+
### fromError() {#fromerror}
|
|
119
119
|
|
|
120
120
|
> `static` **fromError**(`err`): `BaseError`
|
|
121
121
|
|
|
@@ -137,7 +137,7 @@ The new instance.
|
|
|
137
137
|
|
|
138
138
|
***
|
|
139
139
|
|
|
140
|
-
### flatten()
|
|
140
|
+
### flatten() {#flatten}
|
|
141
141
|
|
|
142
142
|
> `static` **flatten**(`err`): [`IError`](../interfaces/IError.md)[]
|
|
143
143
|
|
|
@@ -159,7 +159,7 @@ The list of all internal errors.
|
|
|
159
159
|
|
|
160
160
|
***
|
|
161
161
|
|
|
162
|
-
### expand()
|
|
162
|
+
### expand() {#expand}
|
|
163
163
|
|
|
164
164
|
> `static` **expand**(`errors`): [`IError`](../interfaces/IError.md) \| `undefined`
|
|
165
165
|
|
|
@@ -181,7 +181,7 @@ The first level error.
|
|
|
181
181
|
|
|
182
182
|
***
|
|
183
183
|
|
|
184
|
-
### isErrorName()
|
|
184
|
+
### isErrorName() {#iserrorname}
|
|
185
185
|
|
|
186
186
|
> `static` **isErrorName**(`error`, `name`): `error is BaseError`
|
|
187
187
|
|
|
@@ -209,7 +209,7 @@ True if the error has the name.
|
|
|
209
209
|
|
|
210
210
|
***
|
|
211
211
|
|
|
212
|
-
### isErrorMessage()
|
|
212
|
+
### isErrorMessage() {#iserrormessage}
|
|
213
213
|
|
|
214
214
|
> `static` **isErrorMessage**(`error`, `message`): `error is BaseError`
|
|
215
215
|
|
|
@@ -237,7 +237,7 @@ True if the error has the name.
|
|
|
237
237
|
|
|
238
238
|
***
|
|
239
239
|
|
|
240
|
-
### isErrorCode()
|
|
240
|
+
### isErrorCode() {#iserrorcode}
|
|
241
241
|
|
|
242
242
|
> `static` **isErrorCode**(`error`, `code`): `boolean`
|
|
243
243
|
|
|
@@ -265,7 +265,7 @@ True if the error has the code.
|
|
|
265
265
|
|
|
266
266
|
***
|
|
267
267
|
|
|
268
|
-
### someErrorName()
|
|
268
|
+
### someErrorName() {#someerrorname}
|
|
269
269
|
|
|
270
270
|
> `static` **someErrorName**(`error`, `name`): `error is BaseError`
|
|
271
271
|
|
|
@@ -293,7 +293,7 @@ True if the error has the name.
|
|
|
293
293
|
|
|
294
294
|
***
|
|
295
295
|
|
|
296
|
-
### someErrorMessage()
|
|
296
|
+
### someErrorMessage() {#someerrormessage}
|
|
297
297
|
|
|
298
298
|
> `static` **someErrorMessage**(`error`, `message`): `error is BaseError`
|
|
299
299
|
|
|
@@ -321,7 +321,7 @@ True if the error has the name.
|
|
|
321
321
|
|
|
322
322
|
***
|
|
323
323
|
|
|
324
|
-
### someErrorClass()
|
|
324
|
+
### someErrorClass() {#someerrorclass}
|
|
325
325
|
|
|
326
326
|
> `static` **someErrorClass**(`error`, `cls`): `error is BaseError`
|
|
327
327
|
|
|
@@ -349,7 +349,7 @@ True if the error has the specific class.
|
|
|
349
349
|
|
|
350
350
|
***
|
|
351
351
|
|
|
352
|
-
### someErrorCode()
|
|
352
|
+
### someErrorCode() {#someerrorcode}
|
|
353
353
|
|
|
354
354
|
> `static` **someErrorCode**(`error`, `code`): `error is BaseError`
|
|
355
355
|
|
|
@@ -377,7 +377,7 @@ True if the error has the name.
|
|
|
377
377
|
|
|
378
378
|
***
|
|
379
379
|
|
|
380
|
-
### isEmpty()
|
|
380
|
+
### isEmpty() {#isempty}
|
|
381
381
|
|
|
382
382
|
> `static` **isEmpty**(`err`): `boolean`
|
|
383
383
|
|
|
@@ -399,7 +399,7 @@ True if the error is empty.
|
|
|
399
399
|
|
|
400
400
|
***
|
|
401
401
|
|
|
402
|
-
### isAggregateError()
|
|
402
|
+
### isAggregateError() {#isaggregateerror}
|
|
403
403
|
|
|
404
404
|
> `static` **isAggregateError**(`err`): `err is AggregateError`
|
|
405
405
|
|
|
@@ -421,7 +421,7 @@ True if the error is an aggregate error.
|
|
|
421
421
|
|
|
422
422
|
***
|
|
423
423
|
|
|
424
|
-
### fromAggregate()
|
|
424
|
+
### fromAggregate() {#fromaggregate}
|
|
425
425
|
|
|
426
426
|
> `static` **fromAggregate**(`err`, `includeStackTrace?`): [`IError`](../interfaces/IError.md)[]
|
|
427
427
|
|
|
@@ -449,7 +449,7 @@ The array of errors.
|
|
|
449
449
|
|
|
450
450
|
***
|
|
451
451
|
|
|
452
|
-
### toJsonObject()
|
|
452
|
+
### toJsonObject() {#tojsonobject}
|
|
453
453
|
|
|
454
454
|
> **toJsonObject**(`includeStackTrace?`): [`IError`](../interfaces/IError.md)
|
|
455
455
|
|
|
@@ -24,7 +24,7 @@ The length of the bit string.
|
|
|
24
24
|
|
|
25
25
|
## Properties
|
|
26
26
|
|
|
27
|
-
### CLASS\_NAME
|
|
27
|
+
### CLASS\_NAME {#class_name}
|
|
28
28
|
|
|
29
29
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ Runtime name for the class.
|
|
|
32
32
|
|
|
33
33
|
## Methods
|
|
34
34
|
|
|
35
|
-
### fromBits()
|
|
35
|
+
### fromBits() {#frombits}
|
|
36
36
|
|
|
37
37
|
> `static` **fromBits**(`bits`, `numberBits`): `BitString`
|
|
38
38
|
|
|
@@ -60,7 +60,7 @@ The new instance of BitString.
|
|
|
60
60
|
|
|
61
61
|
***
|
|
62
62
|
|
|
63
|
-
### getBit()
|
|
63
|
+
### getBit() {#getbit}
|
|
64
64
|
|
|
65
65
|
> **getBit**(`index`): `boolean`
|
|
66
66
|
|
|
@@ -86,7 +86,7 @@ GeneralError if the index is out of range.
|
|
|
86
86
|
|
|
87
87
|
***
|
|
88
88
|
|
|
89
|
-
### setBit()
|
|
89
|
+
### setBit() {#setbit}
|
|
90
90
|
|
|
91
91
|
> **setBit**(`index`, `value`): `void`
|
|
92
92
|
|
|
@@ -116,7 +116,7 @@ GeneralError if the index is out of range.
|
|
|
116
116
|
|
|
117
117
|
***
|
|
118
118
|
|
|
119
|
-
### getBits()
|
|
119
|
+
### getBits() {#getbits}
|
|
120
120
|
|
|
121
121
|
> **getBits**(): `Uint8Array`
|
|
122
122
|
|
|
@@ -130,7 +130,7 @@ The bits stored in a Uint8Array.
|
|
|
130
130
|
|
|
131
131
|
***
|
|
132
132
|
|
|
133
|
-
### getLength()
|
|
133
|
+
### getLength() {#getlength}
|
|
134
134
|
|
|
135
135
|
> **getLength**(): `number`
|
|
136
136
|
|
|
@@ -14,7 +14,7 @@ Coerce an object from one type to another.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### string()
|
|
17
|
+
### string() {#string}
|
|
18
18
|
|
|
19
19
|
> `static` **string**(`value`): `string` \| `undefined`
|
|
20
20
|
|
|
@@ -40,7 +40,7 @@ TypeError If the value can not be coerced.
|
|
|
40
40
|
|
|
41
41
|
***
|
|
42
42
|
|
|
43
|
-
### number()
|
|
43
|
+
### number() {#number}
|
|
44
44
|
|
|
45
45
|
> `static` **number**(`value`): `number` \| `undefined`
|
|
46
46
|
|
|
@@ -66,7 +66,7 @@ TypeError If the value can not be coerced.
|
|
|
66
66
|
|
|
67
67
|
***
|
|
68
68
|
|
|
69
|
-
### integer()
|
|
69
|
+
### integer() {#integer}
|
|
70
70
|
|
|
71
71
|
> `static` **integer**(`value`): `number` \| `undefined`
|
|
72
72
|
|
|
@@ -92,7 +92,7 @@ TypeError If the value can not be coerced.
|
|
|
92
92
|
|
|
93
93
|
***
|
|
94
94
|
|
|
95
|
-
### bigint()
|
|
95
|
+
### bigint() {#bigint}
|
|
96
96
|
|
|
97
97
|
> `static` **bigint**(`value`): `bigint` \| `undefined`
|
|
98
98
|
|
|
@@ -118,7 +118,7 @@ TypeError If the value can not be coerced.
|
|
|
118
118
|
|
|
119
119
|
***
|
|
120
120
|
|
|
121
|
-
### boolean()
|
|
121
|
+
### boolean() {#boolean}
|
|
122
122
|
|
|
123
123
|
> `static` **boolean**(`value`): `boolean` \| `undefined`
|
|
124
124
|
|
|
@@ -144,7 +144,7 @@ TypeError If the value can not be coerced.
|
|
|
144
144
|
|
|
145
145
|
***
|
|
146
146
|
|
|
147
|
-
### date()
|
|
147
|
+
### date() {#date}
|
|
148
148
|
|
|
149
149
|
> `static` **date**(`value`): `Date` \| `undefined`
|
|
150
150
|
|
|
@@ -170,7 +170,7 @@ TypeError If the value can not be coerced.
|
|
|
170
170
|
|
|
171
171
|
***
|
|
172
172
|
|
|
173
|
-
### dateTime()
|
|
173
|
+
### dateTime() {#datetime}
|
|
174
174
|
|
|
175
175
|
> `static` **dateTime**(`value`): `Date` \| `undefined`
|
|
176
176
|
|
|
@@ -196,7 +196,7 @@ TypeError If the value can not be coerced.
|
|
|
196
196
|
|
|
197
197
|
***
|
|
198
198
|
|
|
199
|
-
### time()
|
|
199
|
+
### time() {#time}
|
|
200
200
|
|
|
201
201
|
> `static` **time**(`value`): `Date` \| `undefined`
|
|
202
202
|
|
|
@@ -222,7 +222,7 @@ TypeError If the value can not be coerced.
|
|
|
222
222
|
|
|
223
223
|
***
|
|
224
224
|
|
|
225
|
-
### object()
|
|
225
|
+
### object() {#object}
|
|
226
226
|
|
|
227
227
|
> `static` **object**\<`T`\>(`value`): `T` \| `undefined`
|
|
228
228
|
|
|
@@ -254,7 +254,7 @@ TypeError If the value can not be coerced.
|
|
|
254
254
|
|
|
255
255
|
***
|
|
256
256
|
|
|
257
|
-
### uint8Array()
|
|
257
|
+
### uint8Array() {#uint8array}
|
|
258
258
|
|
|
259
259
|
> `static` **uint8Array**(`value`): `Uint8Array`\<`ArrayBufferLike`\> \| `undefined`
|
|
260
260
|
|
|
@@ -280,7 +280,7 @@ TypeError If the value can not be coerced.
|
|
|
280
280
|
|
|
281
281
|
***
|
|
282
282
|
|
|
283
|
-
### byType()
|
|
283
|
+
### byType() {#bytype}
|
|
284
284
|
|
|
285
285
|
> `static` **byType**(`value`, `type?`): `unknown`
|
|
286
286
|
|
|
@@ -14,7 +14,7 @@ A class to handle compression.
|
|
|
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,7 +22,7 @@ Runtime name for the class.
|
|
|
22
22
|
|
|
23
23
|
## Methods
|
|
24
24
|
|
|
25
|
-
### compress()
|
|
25
|
+
### compress() {#compress}
|
|
26
26
|
|
|
27
27
|
> `static` **compress**(`bytes`, `type`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
28
28
|
|
|
@@ -50,7 +50,7 @@ The compressed bytes.
|
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
53
|
-
### decompress()
|
|
53
|
+
### decompress() {#decompress}
|
|
54
54
|
|
|
55
55
|
> `static` **decompress**(`compressedBytes`, `type`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
56
56
|
|
|
@@ -60,7 +60,7 @@ The cause or the error if we have wrapped another error.
|
|
|
60
60
|
|
|
61
61
|
## Properties
|
|
62
62
|
|
|
63
|
-
### source?
|
|
63
|
+
### source? {#source}
|
|
64
64
|
|
|
65
65
|
> `optional` **source**: `string`
|
|
66
66
|
|
|
@@ -72,7 +72,7 @@ The source of the error.
|
|
|
72
72
|
|
|
73
73
|
***
|
|
74
74
|
|
|
75
|
-
### properties?
|
|
75
|
+
### properties? {#properties}
|
|
76
76
|
|
|
77
77
|
> `optional` **properties**: `object`
|
|
78
78
|
|
|
@@ -88,7 +88,7 @@ Any additional information for the error.
|
|
|
88
88
|
|
|
89
89
|
***
|
|
90
90
|
|
|
91
|
-
### cause?
|
|
91
|
+
### cause? {#cause}
|
|
92
92
|
|
|
93
93
|
> `optional` **cause**: [`IError`](../interfaces/IError.md)
|
|
94
94
|
|
|
@@ -100,7 +100,7 @@ The cause of the error.
|
|
|
100
100
|
|
|
101
101
|
***
|
|
102
102
|
|
|
103
|
-
### CLASS\_NAME
|
|
103
|
+
### CLASS\_NAME {#class_name}
|
|
104
104
|
|
|
105
105
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
106
106
|
|
|
@@ -108,7 +108,7 @@ Runtime name for the class.
|
|
|
108
108
|
|
|
109
109
|
## Methods
|
|
110
110
|
|
|
111
|
-
### fromError()
|
|
111
|
+
### fromError() {#fromerror}
|
|
112
112
|
|
|
113
113
|
> `static` **fromError**(`err`): [`BaseError`](BaseError.md)
|
|
114
114
|
|
|
@@ -134,7 +134,7 @@ The new instance.
|
|
|
134
134
|
|
|
135
135
|
***
|
|
136
136
|
|
|
137
|
-
### flatten()
|
|
137
|
+
### flatten() {#flatten}
|
|
138
138
|
|
|
139
139
|
> `static` **flatten**(`err`): [`IError`](../interfaces/IError.md)[]
|
|
140
140
|
|
|
@@ -160,7 +160,7 @@ The list of all internal errors.
|
|
|
160
160
|
|
|
161
161
|
***
|
|
162
162
|
|
|
163
|
-
### expand()
|
|
163
|
+
### expand() {#expand}
|
|
164
164
|
|
|
165
165
|
> `static` **expand**(`errors`): [`IError`](../interfaces/IError.md) \| `undefined`
|
|
166
166
|
|
|
@@ -186,7 +186,7 @@ The first level error.
|
|
|
186
186
|
|
|
187
187
|
***
|
|
188
188
|
|
|
189
|
-
### isErrorName()
|
|
189
|
+
### isErrorName() {#iserrorname}
|
|
190
190
|
|
|
191
191
|
> `static` **isErrorName**(`error`, `name`): `error is BaseError`
|
|
192
192
|
|
|
@@ -218,7 +218,7 @@ True if the error has the name.
|
|
|
218
218
|
|
|
219
219
|
***
|
|
220
220
|
|
|
221
|
-
### isErrorMessage()
|
|
221
|
+
### isErrorMessage() {#iserrormessage}
|
|
222
222
|
|
|
223
223
|
> `static` **isErrorMessage**(`error`, `message`): `error is BaseError`
|
|
224
224
|
|
|
@@ -250,7 +250,7 @@ True if the error has the name.
|
|
|
250
250
|
|
|
251
251
|
***
|
|
252
252
|
|
|
253
|
-
### isErrorCode()
|
|
253
|
+
### isErrorCode() {#iserrorcode}
|
|
254
254
|
|
|
255
255
|
> `static` **isErrorCode**(`error`, `code`): `boolean`
|
|
256
256
|
|
|
@@ -282,7 +282,7 @@ True if the error has the code.
|
|
|
282
282
|
|
|
283
283
|
***
|
|
284
284
|
|
|
285
|
-
### someErrorName()
|
|
285
|
+
### someErrorName() {#someerrorname}
|
|
286
286
|
|
|
287
287
|
> `static` **someErrorName**(`error`, `name`): `error is BaseError`
|
|
288
288
|
|
|
@@ -314,7 +314,7 @@ True if the error has the name.
|
|
|
314
314
|
|
|
315
315
|
***
|
|
316
316
|
|
|
317
|
-
### someErrorMessage()
|
|
317
|
+
### someErrorMessage() {#someerrormessage}
|
|
318
318
|
|
|
319
319
|
> `static` **someErrorMessage**(`error`, `message`): `error is BaseError`
|
|
320
320
|
|
|
@@ -346,7 +346,7 @@ True if the error has the name.
|
|
|
346
346
|
|
|
347
347
|
***
|
|
348
348
|
|
|
349
|
-
### someErrorClass()
|
|
349
|
+
### someErrorClass() {#someerrorclass}
|
|
350
350
|
|
|
351
351
|
> `static` **someErrorClass**(`error`, `cls`): `error is BaseError`
|
|
352
352
|
|
|
@@ -378,7 +378,7 @@ True if the error has the specific class.
|
|
|
378
378
|
|
|
379
379
|
***
|
|
380
380
|
|
|
381
|
-
### someErrorCode()
|
|
381
|
+
### someErrorCode() {#someerrorcode}
|
|
382
382
|
|
|
383
383
|
> `static` **someErrorCode**(`error`, `code`): `error is BaseError`
|
|
384
384
|
|
|
@@ -410,7 +410,7 @@ True if the error has the name.
|
|
|
410
410
|
|
|
411
411
|
***
|
|
412
412
|
|
|
413
|
-
### isEmpty()
|
|
413
|
+
### isEmpty() {#isempty}
|
|
414
414
|
|
|
415
415
|
> `static` **isEmpty**(`err`): `boolean`
|
|
416
416
|
|
|
@@ -436,7 +436,7 @@ True if the error is empty.
|
|
|
436
436
|
|
|
437
437
|
***
|
|
438
438
|
|
|
439
|
-
### isAggregateError()
|
|
439
|
+
### isAggregateError() {#isaggregateerror}
|
|
440
440
|
|
|
441
441
|
> `static` **isAggregateError**(`err`): `err is AggregateError`
|
|
442
442
|
|
|
@@ -462,7 +462,7 @@ True if the error is an aggregate error.
|
|
|
462
462
|
|
|
463
463
|
***
|
|
464
464
|
|
|
465
|
-
### fromAggregate()
|
|
465
|
+
### fromAggregate() {#fromaggregate}
|
|
466
466
|
|
|
467
467
|
> `static` **fromAggregate**(`err`, `includeStackTrace?`): [`IError`](../interfaces/IError.md)[]
|
|
468
468
|
|
|
@@ -494,7 +494,7 @@ The array of errors.
|
|
|
494
494
|
|
|
495
495
|
***
|
|
496
496
|
|
|
497
|
-
### toJsonObject()
|
|
497
|
+
### toJsonObject() {#tojsonobject}
|
|
498
498
|
|
|
499
499
|
> **toJsonObject**(`includeStackTrace?`): [`IError`](../interfaces/IError.md)
|
|
500
500
|
|
|
@@ -14,7 +14,7 @@ Convert arrays to and from different formats.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### bytesToUtf8()
|
|
17
|
+
### bytesToUtf8() {#bytestoutf8}
|
|
18
18
|
|
|
19
19
|
> `static` **bytesToUtf8**(`array`, `startIndex?`, `length?`): `string`
|
|
20
20
|
|
|
@@ -48,7 +48,7 @@ The array formatted as UTF8.
|
|
|
48
48
|
|
|
49
49
|
***
|
|
50
50
|
|
|
51
|
-
### utf8ToBytes()
|
|
51
|
+
### utf8ToBytes() {#utf8tobytes}
|
|
52
52
|
|
|
53
53
|
> `static` **utf8ToBytes**(`utf8`): `Uint8Array`
|
|
54
54
|
|
|
@@ -70,9 +70,9 @@ The array.
|
|
|
70
70
|
|
|
71
71
|
***
|
|
72
72
|
|
|
73
|
-
### bytesToHex()
|
|
73
|
+
### bytesToHex() {#bytestohex}
|
|
74
74
|
|
|
75
|
-
> `static` **bytesToHex**(`array`, `includePrefix
|
|
75
|
+
> `static` **bytesToHex**(`array`, `includePrefix?`, `startIndex?`, `length?`, `reverse?`): `string`
|
|
76
76
|
|
|
77
77
|
Encode a raw array to hex string.
|
|
78
78
|
|
|
@@ -84,7 +84,7 @@ Encode a raw array to hex string.
|
|
|
84
84
|
|
|
85
85
|
The bytes to encode.
|
|
86
86
|
|
|
87
|
-
##### includePrefix
|
|
87
|
+
##### includePrefix?
|
|
88
88
|
|
|
89
89
|
`boolean` = `false`
|
|
90
90
|
|
|
@@ -116,7 +116,7 @@ The array formatted as hex.
|
|
|
116
116
|
|
|
117
117
|
***
|
|
118
118
|
|
|
119
|
-
### hexToBytes()
|
|
119
|
+
### hexToBytes() {#hextobytes}
|
|
120
120
|
|
|
121
121
|
> `static` **hexToBytes**(`hex`, `reverse?`): `Uint8Array`
|
|
122
122
|
|
|
@@ -144,9 +144,9 @@ The array.
|
|
|
144
144
|
|
|
145
145
|
***
|
|
146
146
|
|
|
147
|
-
### utf8ToHex()
|
|
147
|
+
### utf8ToHex() {#utf8tohex}
|
|
148
148
|
|
|
149
|
-
> `static` **utf8ToHex**(`utf8`, `includePrefix
|
|
149
|
+
> `static` **utf8ToHex**(`utf8`, `includePrefix?`): `string`
|
|
150
150
|
|
|
151
151
|
Convert the UTF8 to hex.
|
|
152
152
|
|
|
@@ -158,7 +158,7 @@ Convert the UTF8 to hex.
|
|
|
158
158
|
|
|
159
159
|
The text to convert.
|
|
160
160
|
|
|
161
|
-
##### includePrefix
|
|
161
|
+
##### includePrefix?
|
|
162
162
|
|
|
163
163
|
`boolean` = `false`
|
|
164
164
|
|
|
@@ -172,7 +172,7 @@ The hex version of the bytes.
|
|
|
172
172
|
|
|
173
173
|
***
|
|
174
174
|
|
|
175
|
-
### hexToUtf8()
|
|
175
|
+
### hexToUtf8() {#hextoutf8}
|
|
176
176
|
|
|
177
177
|
> `static` **hexToUtf8**(`hex`): `string`
|
|
178
178
|
|
|
@@ -194,7 +194,7 @@ The UTF8 version of the bytes.
|
|
|
194
194
|
|
|
195
195
|
***
|
|
196
196
|
|
|
197
|
-
### bytesToBinary()
|
|
197
|
+
### bytesToBinary() {#bytestobinary}
|
|
198
198
|
|
|
199
199
|
> `static` **bytesToBinary**(`bytes`): `string`
|
|
200
200
|
|
|
@@ -216,7 +216,7 @@ A binary string of the bytes.
|
|
|
216
216
|
|
|
217
217
|
***
|
|
218
218
|
|
|
219
|
-
### binaryToBytes()
|
|
219
|
+
### binaryToBytes() {#binarytobytes}
|
|
220
220
|
|
|
221
221
|
> `static` **binaryToBytes**(`binary`): `Uint8Array`
|
|
222
222
|
|
|
@@ -238,7 +238,7 @@ The bytes.
|
|
|
238
238
|
|
|
239
239
|
***
|
|
240
240
|
|
|
241
|
-
### bytesToBase64()
|
|
241
|
+
### bytesToBase64() {#bytestobase64}
|
|
242
242
|
|
|
243
243
|
> `static` **bytesToBase64**(`bytes`): `string`
|
|
244
244
|
|
|
@@ -260,7 +260,7 @@ A base64 string of the bytes.
|
|
|
260
260
|
|
|
261
261
|
***
|
|
262
262
|
|
|
263
|
-
### base64ToBytes()
|
|
263
|
+
### base64ToBytes() {#base64tobytes}
|
|
264
264
|
|
|
265
265
|
> `static` **base64ToBytes**(`base64`): `Uint8Array`
|
|
266
266
|
|
|
@@ -282,7 +282,7 @@ The bytes.
|
|
|
282
282
|
|
|
283
283
|
***
|
|
284
284
|
|
|
285
|
-
### bytesToBase64Url()
|
|
285
|
+
### bytesToBase64Url() {#bytestobase64url}
|
|
286
286
|
|
|
287
287
|
> `static` **bytesToBase64Url**(`bytes`): `string`
|
|
288
288
|
|
|
@@ -304,7 +304,7 @@ A base64 url string of the bytes.
|
|
|
304
304
|
|
|
305
305
|
***
|
|
306
306
|
|
|
307
|
-
### base64UrlToBytes()
|
|
307
|
+
### base64UrlToBytes() {#base64urltobytes}
|
|
308
308
|
|
|
309
309
|
> `static` **base64UrlToBytes**(`base64Url`): `Uint8Array`
|
|
310
310
|
|
|
@@ -326,7 +326,7 @@ The bytes.
|
|
|
326
326
|
|
|
327
327
|
***
|
|
328
328
|
|
|
329
|
-
### bytesToBase58()
|
|
329
|
+
### bytesToBase58() {#bytestobase58}
|
|
330
330
|
|
|
331
331
|
> `static` **bytesToBase58**(`bytes`): `string`
|
|
332
332
|
|
|
@@ -348,7 +348,7 @@ A base58 string of the bytes.
|
|
|
348
348
|
|
|
349
349
|
***
|
|
350
350
|
|
|
351
|
-
### base58ToBytes()
|
|
351
|
+
### base58ToBytes() {#base58tobytes}
|
|
352
352
|
|
|
353
353
|
> `static` **base58ToBytes**(`base58`): `Uint8Array`
|
|
354
354
|
|
|
@@ -14,7 +14,7 @@ Error helper functions.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### formatErrors()
|
|
17
|
+
### formatErrors() {#formaterrors}
|
|
18
18
|
|
|
19
19
|
> `static` **formatErrors**(`error`, `includeDetails?`): `string`[]
|
|
20
20
|
|
|
@@ -42,7 +42,7 @@ The error formatted including any causes errors.
|
|
|
42
42
|
|
|
43
43
|
***
|
|
44
44
|
|
|
45
|
-
### localizeErrors()
|
|
45
|
+
### localizeErrors() {#localizeerrors}
|
|
46
46
|
|
|
47
47
|
> `static` **localizeErrors**(`error`): [`IError`](../interfaces/IError.md)[]
|
|
48
48
|
|
|
@@ -64,7 +64,7 @@ The localized version of the errors flattened.
|
|
|
64
64
|
|
|
65
65
|
***
|
|
66
66
|
|
|
67
|
-
### formatValidationErrors()
|
|
67
|
+
### formatValidationErrors() {#formatvalidationerrors}
|
|
68
68
|
|
|
69
69
|
> `static` **formatValidationErrors**(`error`): `string` \| `undefined`
|
|
70
70
|
|