@twin.org/core 0.0.1-next.51 → 0.0.1-next.53
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 +225 -75
- package/dist/esm/index.mjs +225 -76
- package/dist/types/index.d.ts +2 -0
- package/dist/types/models/II18nShared.d.ts +29 -0
- package/dist/types/utils/asyncCache.d.ts +2 -1
- package/dist/types/utils/sharedStore.d.ts +23 -0
- package/docs/changelog.md +14 -0
- package/docs/reference/classes/AlreadyExistsError.md +7 -7
- package/docs/reference/classes/ArrayHelper.md +3 -3
- package/docs/reference/classes/AsyncCache.md +21 -9
- package/docs/reference/classes/Base32.md +3 -3
- package/docs/reference/classes/Base58.md +3 -3
- package/docs/reference/classes/Base64.md +3 -3
- package/docs/reference/classes/Base64Url.md +3 -3
- package/docs/reference/classes/BaseError.md +5 -5
- package/docs/reference/classes/BitString.md +5 -5
- package/docs/reference/classes/Coerce.md +7 -5
- package/docs/reference/classes/Compression.md +3 -3
- package/docs/reference/classes/ConflictError.md +7 -7
- package/docs/reference/classes/Converter.md +6 -6
- package/docs/reference/classes/EnvHelper.md +7 -5
- package/docs/reference/classes/ErrorHelper.md +3 -3
- package/docs/reference/classes/Factory.md +17 -7
- package/docs/reference/classes/FilenameHelper.md +3 -3
- package/docs/reference/classes/GeneralError.md +7 -7
- package/docs/reference/classes/GuardError.md +7 -7
- package/docs/reference/classes/Guards.md +18 -8
- package/docs/reference/classes/HexHelper.md +3 -3
- package/docs/reference/classes/I18n.md +6 -6
- package/docs/reference/classes/Is.md +21 -9
- package/docs/reference/classes/JsonHelper.md +10 -6
- package/docs/reference/classes/NotFoundError.md +7 -7
- package/docs/reference/classes/NotImplementedError.md +7 -7
- package/docs/reference/classes/NotSupportedError.md +7 -7
- package/docs/reference/classes/ObjectHelper.md +40 -18
- package/docs/reference/classes/RandomHelper.md +3 -3
- package/docs/reference/classes/SharedStore.md +94 -0
- package/docs/reference/classes/StringHelper.md +3 -3
- package/docs/reference/classes/Uint8ArrayHelper.md +3 -3
- package/docs/reference/classes/UnauthorizedError.md +7 -7
- package/docs/reference/classes/UnprocessableError.md +7 -7
- package/docs/reference/classes/Url.md +7 -7
- package/docs/reference/classes/Urn.md +9 -9
- package/docs/reference/classes/Validation.md +36 -28
- package/docs/reference/classes/ValidationError.md +7 -7
- package/docs/reference/index.md +2 -0
- package/docs/reference/interfaces/IComponent.md +3 -3
- package/docs/reference/interfaces/IError.md +1 -1
- package/docs/reference/interfaces/II18nShared.md +47 -0
- package/docs/reference/interfaces/IKeyValue.md +3 -1
- package/docs/reference/interfaces/ILabelledValue.md +3 -1
- package/docs/reference/interfaces/ILocaleDictionary.md +1 -1
- package/docs/reference/type-aliases/CoerceType.md +1 -1
- package/docs/reference/type-aliases/CompressionType.md +1 -1
- package/package.json +2 -2
|
@@ -4,13 +4,13 @@ Helper methods for hex conversions.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new HexHelper**():
|
|
9
|
+
> **new HexHelper**(): `HexHelper`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`HexHelper`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -4,13 +4,13 @@ Class to perform internationalization.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new I18n**():
|
|
9
|
+
> **new I18n**(): `I18n`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`I18n`
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
@@ -84,7 +84,7 @@ The dictionary to add.
|
|
|
84
84
|
|
|
85
85
|
### getDictionary()
|
|
86
86
|
|
|
87
|
-
> `static` **getDictionary**(`locale`): `undefined` \| \{\}
|
|
87
|
+
> `static` **getDictionary**(`locale`): `undefined` \| \{[`key`: `string`]: `string`; \}
|
|
88
88
|
|
|
89
89
|
Get a locale dictionary.
|
|
90
90
|
|
|
@@ -98,7 +98,7 @@ The locale.
|
|
|
98
98
|
|
|
99
99
|
#### Returns
|
|
100
100
|
|
|
101
|
-
`undefined` \| \{\}
|
|
101
|
+
`undefined` \| \{[`key`: `string`]: `string`; \}
|
|
102
102
|
|
|
103
103
|
The dictionary of undefined if it does not exist.
|
|
104
104
|
|
|
@@ -212,7 +212,7 @@ The id of the handler.
|
|
|
212
212
|
|
|
213
213
|
### formatMessage()
|
|
214
214
|
|
|
215
|
-
> `static` **formatMessage**(`key`, `values
|
|
215
|
+
> `static` **formatMessage**(`key`, `values?`, `overrideLocale?`): `string`
|
|
216
216
|
|
|
217
217
|
Format a message.
|
|
218
218
|
|
|
@@ -4,13 +4,13 @@ Class to check types of objects.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Is**():
|
|
9
|
+
> **new Is**(): `Is`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`Is`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -546,7 +546,9 @@ Is the value an object.
|
|
|
546
546
|
|
|
547
547
|
#### Type Parameters
|
|
548
548
|
|
|
549
|
-
|
|
549
|
+
##### T
|
|
550
|
+
|
|
551
|
+
`T` = \{[`id`: `string`]: `unknown`; \}
|
|
550
552
|
|
|
551
553
|
#### Parameters
|
|
552
554
|
|
|
@@ -572,7 +574,9 @@ Is the value an object with at least one property.
|
|
|
572
574
|
|
|
573
575
|
#### Type Parameters
|
|
574
576
|
|
|
575
|
-
|
|
577
|
+
##### T
|
|
578
|
+
|
|
579
|
+
`T` = \{[`id`: `string`]: `unknown`; \}
|
|
576
580
|
|
|
577
581
|
#### Parameters
|
|
578
582
|
|
|
@@ -598,7 +602,9 @@ Is the value an array.
|
|
|
598
602
|
|
|
599
603
|
#### Type Parameters
|
|
600
604
|
|
|
601
|
-
|
|
605
|
+
##### T
|
|
606
|
+
|
|
607
|
+
`T`
|
|
602
608
|
|
|
603
609
|
#### Parameters
|
|
604
610
|
|
|
@@ -624,7 +630,9 @@ Is the value an array with at least one element.
|
|
|
624
630
|
|
|
625
631
|
#### Type Parameters
|
|
626
632
|
|
|
627
|
-
|
|
633
|
+
##### T
|
|
634
|
+
|
|
635
|
+
`T`
|
|
628
636
|
|
|
629
637
|
#### Parameters
|
|
630
638
|
|
|
@@ -650,7 +658,9 @@ Is the value an array with at least one element.
|
|
|
650
658
|
|
|
651
659
|
#### Type Parameters
|
|
652
660
|
|
|
653
|
-
|
|
661
|
+
##### T
|
|
662
|
+
|
|
663
|
+
`T`
|
|
654
664
|
|
|
655
665
|
#### Parameters
|
|
656
666
|
|
|
@@ -770,7 +780,9 @@ Is the value a promise.
|
|
|
770
780
|
|
|
771
781
|
#### Type Parameters
|
|
772
782
|
|
|
773
|
-
|
|
783
|
+
##### T
|
|
784
|
+
|
|
785
|
+
`T` = `unknown`
|
|
774
786
|
|
|
775
787
|
#### Parameters
|
|
776
788
|
|
|
@@ -4,13 +4,13 @@ Helpers methods for JSON objects.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new JsonHelper**():
|
|
9
|
+
> **new JsonHelper**(): `JsonHelper`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`JsonHelper`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -46,7 +46,9 @@ Based on https://www.rfc-editor.org/rfc/rfc6902.
|
|
|
46
46
|
|
|
47
47
|
#### Type Parameters
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
##### T
|
|
50
|
+
|
|
51
|
+
`T` = `unknown`
|
|
50
52
|
|
|
51
53
|
#### Parameters
|
|
52
54
|
|
|
@@ -79,7 +81,9 @@ Based on https://www.rfc-editor.org/rfc/rfc6902.
|
|
|
79
81
|
|
|
80
82
|
#### Type Parameters
|
|
81
83
|
|
|
82
|
-
|
|
84
|
+
##### T
|
|
85
|
+
|
|
86
|
+
`T` = `unknown`
|
|
83
87
|
|
|
84
88
|
#### Parameters
|
|
85
89
|
|
|
@@ -109,7 +113,7 @@ GeneralError if the patch fails.
|
|
|
109
113
|
|
|
110
114
|
### stringifyEx()
|
|
111
115
|
|
|
112
|
-
> `static` **stringifyEx**(`object`, `space
|
|
116
|
+
> `static` **stringifyEx**(`object`, `space?`): `string`
|
|
113
117
|
|
|
114
118
|
Stringify the JSON with support for extended data types date/bigint/uint8array.
|
|
115
119
|
|
|
@@ -8,9 +8,9 @@ Class to handle errors which are triggered by data not being found.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new NotFoundError**(`source`, `message`, `notFoundId
|
|
13
|
+
> **new NotFoundError**(`source`, `message`, `notFoundId?`, `inner?`): `NotFoundError`
|
|
14
14
|
|
|
15
15
|
Create a new instance of NotFoundError.
|
|
16
16
|
|
|
@@ -42,11 +42,11 @@ The inner error if we have wrapped another error.
|
|
|
42
42
|
|
|
43
43
|
#### Returns
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
`NotFoundError`
|
|
46
46
|
|
|
47
47
|
#### Overrides
|
|
48
48
|
|
|
49
|
-
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#
|
|
49
|
+
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#constructor)
|
|
50
50
|
|
|
51
51
|
## Properties
|
|
52
52
|
|
|
@@ -58,7 +58,7 @@ The source of the error.
|
|
|
58
58
|
|
|
59
59
|
#### Inherited from
|
|
60
60
|
|
|
61
|
-
[`BaseError`](BaseError.md).[`source`](BaseError.md#source
|
|
61
|
+
[`BaseError`](BaseError.md).[`source`](BaseError.md#source)
|
|
62
62
|
|
|
63
63
|
***
|
|
64
64
|
|
|
@@ -74,7 +74,7 @@ Any additional information for the error.
|
|
|
74
74
|
|
|
75
75
|
#### Inherited from
|
|
76
76
|
|
|
77
|
-
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties
|
|
77
|
+
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties)
|
|
78
78
|
|
|
79
79
|
***
|
|
80
80
|
|
|
@@ -86,7 +86,7 @@ The inner error if there was one.
|
|
|
86
86
|
|
|
87
87
|
#### Inherited from
|
|
88
88
|
|
|
89
|
-
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner
|
|
89
|
+
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner)
|
|
90
90
|
|
|
91
91
|
***
|
|
92
92
|
|
|
@@ -8,9 +8,9 @@ Class to handle errors.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new NotImplementedError**(`source`, `method`):
|
|
13
|
+
> **new NotImplementedError**(`source`, `method`): `NotImplementedError`
|
|
14
14
|
|
|
15
15
|
Create a new instance of NotImplementedError.
|
|
16
16
|
|
|
@@ -30,11 +30,11 @@ The method for the error.
|
|
|
30
30
|
|
|
31
31
|
#### Returns
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
`NotImplementedError`
|
|
34
34
|
|
|
35
35
|
#### Overrides
|
|
36
36
|
|
|
37
|
-
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#
|
|
37
|
+
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#constructor)
|
|
38
38
|
|
|
39
39
|
## Properties
|
|
40
40
|
|
|
@@ -46,7 +46,7 @@ The source of the error.
|
|
|
46
46
|
|
|
47
47
|
#### Inherited from
|
|
48
48
|
|
|
49
|
-
[`BaseError`](BaseError.md).[`source`](BaseError.md#source
|
|
49
|
+
[`BaseError`](BaseError.md).[`source`](BaseError.md#source)
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
@@ -62,7 +62,7 @@ Any additional information for the error.
|
|
|
62
62
|
|
|
63
63
|
#### Inherited from
|
|
64
64
|
|
|
65
|
-
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties
|
|
65
|
+
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties)
|
|
66
66
|
|
|
67
67
|
***
|
|
68
68
|
|
|
@@ -74,7 +74,7 @@ The inner error if there was one.
|
|
|
74
74
|
|
|
75
75
|
#### Inherited from
|
|
76
76
|
|
|
77
|
-
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner
|
|
77
|
+
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner)
|
|
78
78
|
|
|
79
79
|
***
|
|
80
80
|
|
|
@@ -8,9 +8,9 @@ Class to handle errors when a feature is unsupported.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new NotSupportedError**(`source`, `message`, `inner
|
|
13
|
+
> **new NotSupportedError**(`source`, `message`, `inner?`): `NotSupportedError`
|
|
14
14
|
|
|
15
15
|
Create a new instance of NotSupportedError.
|
|
16
16
|
|
|
@@ -36,11 +36,11 @@ The inner error if we have wrapped another error.
|
|
|
36
36
|
|
|
37
37
|
#### Returns
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
`NotSupportedError`
|
|
40
40
|
|
|
41
41
|
#### Overrides
|
|
42
42
|
|
|
43
|
-
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#
|
|
43
|
+
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#constructor)
|
|
44
44
|
|
|
45
45
|
## Properties
|
|
46
46
|
|
|
@@ -52,7 +52,7 @@ The source of the error.
|
|
|
52
52
|
|
|
53
53
|
#### Inherited from
|
|
54
54
|
|
|
55
|
-
[`BaseError`](BaseError.md).[`source`](BaseError.md#source
|
|
55
|
+
[`BaseError`](BaseError.md).[`source`](BaseError.md#source)
|
|
56
56
|
|
|
57
57
|
***
|
|
58
58
|
|
|
@@ -68,7 +68,7 @@ Any additional information for the error.
|
|
|
68
68
|
|
|
69
69
|
#### Inherited from
|
|
70
70
|
|
|
71
|
-
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties
|
|
71
|
+
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties)
|
|
72
72
|
|
|
73
73
|
***
|
|
74
74
|
|
|
@@ -80,7 +80,7 @@ The inner error if there was one.
|
|
|
80
80
|
|
|
81
81
|
#### Inherited from
|
|
82
82
|
|
|
83
|
-
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner
|
|
83
|
+
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner)
|
|
84
84
|
|
|
85
85
|
***
|
|
86
86
|
|
|
@@ -4,13 +4,13 @@ Class to help with objects.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new ObjectHelper**():
|
|
9
|
+
> **new ObjectHelper**(): `ObjectHelper`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`ObjectHelper`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -22,7 +22,9 @@ Convert an object to bytes.
|
|
|
22
22
|
|
|
23
23
|
#### Type Parameters
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##### T
|
|
26
|
+
|
|
27
|
+
`T`
|
|
26
28
|
|
|
27
29
|
#### Parameters
|
|
28
30
|
|
|
@@ -54,7 +56,9 @@ Convert a bytes to an object.
|
|
|
54
56
|
|
|
55
57
|
#### Type Parameters
|
|
56
58
|
|
|
57
|
-
|
|
59
|
+
##### T
|
|
60
|
+
|
|
61
|
+
`T`
|
|
58
62
|
|
|
59
63
|
#### Parameters
|
|
60
64
|
|
|
@@ -84,7 +88,9 @@ Make a deep clone of an object.
|
|
|
84
88
|
|
|
85
89
|
#### Type Parameters
|
|
86
90
|
|
|
87
|
-
|
|
91
|
+
##### T
|
|
92
|
+
|
|
93
|
+
`T`
|
|
88
94
|
|
|
89
95
|
#### Parameters
|
|
90
96
|
|
|
@@ -110,9 +116,13 @@ Deep merge objects.
|
|
|
110
116
|
|
|
111
117
|
#### Type Parameters
|
|
112
118
|
|
|
113
|
-
|
|
119
|
+
##### T
|
|
120
|
+
|
|
121
|
+
`T` = `unknown`
|
|
114
122
|
|
|
115
|
-
|
|
123
|
+
##### U
|
|
124
|
+
|
|
125
|
+
`U` = `unknown`
|
|
116
126
|
|
|
117
127
|
#### Parameters
|
|
118
128
|
|
|
@@ -138,13 +148,15 @@ The combined deep merge of the objects.
|
|
|
138
148
|
|
|
139
149
|
### equal()
|
|
140
150
|
|
|
141
|
-
> `static` **equal**\<`T`\>(`obj1`, `obj2`, `strictPropertyOrder
|
|
151
|
+
> `static` **equal**\<`T`\>(`obj1`, `obj2`, `strictPropertyOrder?`): `boolean`
|
|
142
152
|
|
|
143
153
|
Does one object equal another.
|
|
144
154
|
|
|
145
155
|
#### Type Parameters
|
|
146
156
|
|
|
147
|
-
|
|
157
|
+
##### T
|
|
158
|
+
|
|
159
|
+
`T`
|
|
148
160
|
|
|
149
161
|
#### Parameters
|
|
150
162
|
|
|
@@ -182,7 +194,9 @@ Get the property of an unknown object.
|
|
|
182
194
|
|
|
183
195
|
#### Type Parameters
|
|
184
196
|
|
|
185
|
-
|
|
197
|
+
##### T
|
|
198
|
+
|
|
199
|
+
`T` = `unknown`
|
|
186
200
|
|
|
187
201
|
#### Parameters
|
|
188
202
|
|
|
@@ -276,7 +290,9 @@ Extract a property from the object, providing alternative names.
|
|
|
276
290
|
|
|
277
291
|
#### Type Parameters
|
|
278
292
|
|
|
279
|
-
|
|
293
|
+
##### T
|
|
294
|
+
|
|
295
|
+
`T`
|
|
280
296
|
|
|
281
297
|
#### Parameters
|
|
282
298
|
|
|
@@ -308,13 +324,15 @@ The property if available.
|
|
|
308
324
|
|
|
309
325
|
### pick()
|
|
310
326
|
|
|
311
|
-
> `static` **pick**\<`T`\>(`obj`, `keys
|
|
327
|
+
> `static` **pick**\<`T`\>(`obj`, `keys?`): `Partial`\<`T`\>
|
|
312
328
|
|
|
313
329
|
Pick a subset of properties from an object.
|
|
314
330
|
|
|
315
331
|
#### Type Parameters
|
|
316
332
|
|
|
317
|
-
|
|
333
|
+
##### T
|
|
334
|
+
|
|
335
|
+
`T`
|
|
318
336
|
|
|
319
337
|
#### Parameters
|
|
320
338
|
|
|
@@ -340,13 +358,15 @@ The partial object.
|
|
|
340
358
|
|
|
341
359
|
### omit()
|
|
342
360
|
|
|
343
|
-
> `static` **omit**\<`T`\>(`obj`, `keys
|
|
361
|
+
> `static` **omit**\<`T`\>(`obj`, `keys?`): `Partial`\<`T`\>
|
|
344
362
|
|
|
345
363
|
Omit a subset of properties from an object.
|
|
346
364
|
|
|
347
365
|
#### Type Parameters
|
|
348
366
|
|
|
349
|
-
|
|
367
|
+
##### T
|
|
368
|
+
|
|
369
|
+
`T`
|
|
350
370
|
|
|
351
371
|
#### Parameters
|
|
352
372
|
|
|
@@ -416,13 +436,15 @@ The object with regular properties.
|
|
|
416
436
|
|
|
417
437
|
### removeEmptyProperties()
|
|
418
438
|
|
|
419
|
-
> `static` **removeEmptyProperties**\<`T`\>(`obj`, `options
|
|
439
|
+
> `static` **removeEmptyProperties**\<`T`\>(`obj`, `options?`): `T`
|
|
420
440
|
|
|
421
441
|
Remove empty properties from an object.
|
|
422
442
|
|
|
423
443
|
#### Type Parameters
|
|
424
444
|
|
|
425
|
-
|
|
445
|
+
##### T
|
|
446
|
+
|
|
447
|
+
`T` = `unknown`
|
|
426
448
|
|
|
427
449
|
#### Parameters
|
|
428
450
|
|
|
@@ -4,13 +4,13 @@ Class to help with random generation.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new RandomHelper**():
|
|
9
|
+
> **new RandomHelper**(): `RandomHelper`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`RandomHelper`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Class: SharedStore
|
|
2
|
+
|
|
3
|
+
Provide a store for shared objects which can be accesses through multiple
|
|
4
|
+
instance loads of a packages.
|
|
5
|
+
|
|
6
|
+
## Constructors
|
|
7
|
+
|
|
8
|
+
### Constructor
|
|
9
|
+
|
|
10
|
+
> **new SharedStore**(): `SharedStore`
|
|
11
|
+
|
|
12
|
+
#### Returns
|
|
13
|
+
|
|
14
|
+
`SharedStore`
|
|
15
|
+
|
|
16
|
+
## Methods
|
|
17
|
+
|
|
18
|
+
### get()
|
|
19
|
+
|
|
20
|
+
> `static` **get**\<`T`\>(`prop`): `undefined` \| `T`
|
|
21
|
+
|
|
22
|
+
Get a property from the shared store.
|
|
23
|
+
|
|
24
|
+
#### Type Parameters
|
|
25
|
+
|
|
26
|
+
##### T
|
|
27
|
+
|
|
28
|
+
`T` = `unknown`
|
|
29
|
+
|
|
30
|
+
#### Parameters
|
|
31
|
+
|
|
32
|
+
##### prop
|
|
33
|
+
|
|
34
|
+
`string`
|
|
35
|
+
|
|
36
|
+
The name of the property to get.
|
|
37
|
+
|
|
38
|
+
#### Returns
|
|
39
|
+
|
|
40
|
+
`undefined` \| `T`
|
|
41
|
+
|
|
42
|
+
The property if it exists.
|
|
43
|
+
|
|
44
|
+
***
|
|
45
|
+
|
|
46
|
+
### set()
|
|
47
|
+
|
|
48
|
+
> `static` **set**\<`T`\>(`prop`, `value`): `void`
|
|
49
|
+
|
|
50
|
+
Set the property in the shared store.
|
|
51
|
+
|
|
52
|
+
#### Type Parameters
|
|
53
|
+
|
|
54
|
+
##### T
|
|
55
|
+
|
|
56
|
+
`T` = `unknown`
|
|
57
|
+
|
|
58
|
+
#### Parameters
|
|
59
|
+
|
|
60
|
+
##### prop
|
|
61
|
+
|
|
62
|
+
`string`
|
|
63
|
+
|
|
64
|
+
The name of the property to set.
|
|
65
|
+
|
|
66
|
+
##### value
|
|
67
|
+
|
|
68
|
+
`T`
|
|
69
|
+
|
|
70
|
+
The value to set.
|
|
71
|
+
|
|
72
|
+
#### Returns
|
|
73
|
+
|
|
74
|
+
`void`
|
|
75
|
+
|
|
76
|
+
***
|
|
77
|
+
|
|
78
|
+
### remove()
|
|
79
|
+
|
|
80
|
+
> `static` **remove**(`prop`): `void`
|
|
81
|
+
|
|
82
|
+
Remove a property from the shared store.
|
|
83
|
+
|
|
84
|
+
#### Parameters
|
|
85
|
+
|
|
86
|
+
##### prop
|
|
87
|
+
|
|
88
|
+
`string`
|
|
89
|
+
|
|
90
|
+
The name of the property to remove.
|
|
91
|
+
|
|
92
|
+
#### Returns
|
|
93
|
+
|
|
94
|
+
`void`
|
|
@@ -4,13 +4,13 @@ Class to help with string.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new StringHelper**():
|
|
9
|
+
> **new StringHelper**(): `StringHelper`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`StringHelper`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -4,13 +4,13 @@ Class to help with uint8 arrays.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Uint8ArrayHelper**():
|
|
9
|
+
> **new Uint8ArrayHelper**(): `Uint8ArrayHelper`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`Uint8ArrayHelper`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -8,9 +8,9 @@ Class to handle errors which are triggered by access not being unauthorized.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new UnauthorizedError**(`source`, `message`, `inner
|
|
13
|
+
> **new UnauthorizedError**(`source`, `message`, `inner?`): `UnauthorizedError`
|
|
14
14
|
|
|
15
15
|
Create a new instance of UnauthorizedError.
|
|
16
16
|
|
|
@@ -36,11 +36,11 @@ The inner error if we have wrapped another error.
|
|
|
36
36
|
|
|
37
37
|
#### Returns
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
`UnauthorizedError`
|
|
40
40
|
|
|
41
41
|
#### Overrides
|
|
42
42
|
|
|
43
|
-
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#
|
|
43
|
+
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#constructor)
|
|
44
44
|
|
|
45
45
|
## Properties
|
|
46
46
|
|
|
@@ -52,7 +52,7 @@ The source of the error.
|
|
|
52
52
|
|
|
53
53
|
#### Inherited from
|
|
54
54
|
|
|
55
|
-
[`BaseError`](BaseError.md).[`source`](BaseError.md#source
|
|
55
|
+
[`BaseError`](BaseError.md).[`source`](BaseError.md#source)
|
|
56
56
|
|
|
57
57
|
***
|
|
58
58
|
|
|
@@ -68,7 +68,7 @@ Any additional information for the error.
|
|
|
68
68
|
|
|
69
69
|
#### Inherited from
|
|
70
70
|
|
|
71
|
-
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties
|
|
71
|
+
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties)
|
|
72
72
|
|
|
73
73
|
***
|
|
74
74
|
|
|
@@ -80,7 +80,7 @@ The inner error if there was one.
|
|
|
80
80
|
|
|
81
81
|
#### Inherited from
|
|
82
82
|
|
|
83
|
-
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner
|
|
83
|
+
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner)
|
|
84
84
|
|
|
85
85
|
***
|
|
86
86
|
|