@twin.org/core 0.0.1-next.9 → 0.0.2-next.3
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 +1574 -833
- package/dist/esm/index.mjs +1571 -834
- package/dist/types/errors/baseError.d.ts +8 -1
- package/dist/types/factories/factory.d.ts +20 -1
- package/dist/types/helpers/arrayHelper.d.ts +13 -0
- package/dist/types/helpers/envHelper.d.ts +16 -0
- package/dist/types/helpers/errorHelper.d.ts +2 -1
- package/dist/types/helpers/jsonHelper.d.ts +30 -0
- package/dist/types/helpers/objectHelper.d.ts +25 -0
- package/dist/types/helpers/uint8ArrayHelper.d.ts +11 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/models/IComponent.d.ts +12 -3
- package/dist/types/models/II18nShared.d.ts +29 -0
- package/dist/types/models/coerceType.d.ts +49 -0
- package/dist/types/models/compressionType.d.ts +1 -1
- package/dist/types/models/objectOrArray.d.ts +4 -0
- package/dist/types/utils/asyncCache.d.ts +10 -1
- package/dist/types/utils/coerce.d.ts +22 -0
- package/dist/types/utils/guards.d.ts +35 -0
- package/dist/types/utils/is.d.ts +12 -0
- package/dist/types/utils/sharedStore.d.ts +23 -0
- package/dist/types/utils/validation.d.ts +2 -0
- package/docs/changelog.md +323 -1
- package/docs/reference/classes/AlreadyExistsError.md +103 -27
- package/docs/reference/classes/ArrayHelper.md +71 -5
- package/docs/reference/classes/AsyncCache.md +75 -13
- package/docs/reference/classes/Base32.md +9 -5
- package/docs/reference/classes/Base58.md +9 -5
- package/docs/reference/classes/Base64.md +12 -6
- package/docs/reference/classes/Base64Url.md +9 -5
- package/docs/reference/classes/BaseError.md +101 -29
- package/docs/reference/classes/BitString.md +23 -11
- package/docs/reference/classes/Coerce.md +110 -12
- package/docs/reference/classes/Compression.md +19 -11
- package/docs/reference/classes/ConflictError.md +106 -28
- package/docs/reference/classes/Converter.md +72 -28
- package/docs/reference/classes/EnvHelper.md +45 -0
- package/docs/reference/classes/ErrorHelper.md +19 -7
- package/docs/reference/classes/Factory.md +95 -17
- package/docs/reference/classes/FilenameHelper.md +6 -4
- package/docs/reference/classes/GeneralError.md +101 -27
- package/docs/reference/classes/GuardError.md +106 -28
- package/docs/reference/classes/Guards.md +398 -80
- package/docs/reference/classes/HexHelper.md +18 -8
- package/docs/reference/classes/I18n.md +46 -20
- package/docs/reference/classes/Is.md +179 -51
- package/docs/reference/classes/JsonHelper.md +146 -10
- package/docs/reference/classes/NotFoundError.md +103 -27
- package/docs/reference/classes/NotImplementedError.md +97 -25
- package/docs/reference/classes/NotSupportedError.md +100 -26
- package/docs/reference/classes/ObjectHelper.md +197 -39
- package/docs/reference/classes/RandomHelper.md +6 -4
- package/docs/reference/classes/SharedStore.md +94 -0
- package/docs/reference/classes/StringHelper.md +54 -20
- package/docs/reference/classes/Uint8ArrayHelper.md +35 -0
- package/docs/reference/classes/UnauthorizedError.md +100 -26
- package/docs/reference/classes/UnprocessableError.md +101 -27
- package/docs/reference/classes/Url.md +37 -17
- package/docs/reference/classes/Urn.md +63 -27
- package/docs/reference/classes/Validation.md +349 -135
- package/docs/reference/classes/ValidationError.md +100 -26
- package/docs/reference/index.md +7 -0
- package/docs/reference/interfaces/IComponent.md +30 -8
- package/docs/reference/interfaces/IError.md +2 -2
- 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/interfaces/IPatchOperation.md +1 -1
- package/docs/reference/interfaces/IValidationFailure.md +1 -1
- package/docs/reference/type-aliases/CoerceType.md +5 -0
- package/docs/reference/type-aliases/CompressionType.md +1 -1
- package/docs/reference/type-aliases/ObjectOrArray.md +11 -0
- package/docs/reference/variables/CoerceType.md +67 -0
- package/docs/reference/variables/CompressionType.md +1 -1
- package/locales/en.json +14 -1
- package/package.json +7 -7
|
@@ -4,33 +4,39 @@ Convert arrays to and from different formats.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Converter**():
|
|
9
|
+
> **new Converter**(): `Converter`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`Converter`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
17
|
### bytesToUtf8()
|
|
18
18
|
|
|
19
|
-
> `static` **bytesToUtf8**(`array`, `startIndex
|
|
19
|
+
> `static` **bytesToUtf8**(`array`, `startIndex?`, `length?`): `string`
|
|
20
20
|
|
|
21
21
|
Encode a raw array to UTF8 string.
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##### array
|
|
26
|
+
|
|
27
|
+
`ArrayLike`\<`number`\>
|
|
26
28
|
|
|
27
29
|
The bytes to encode.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
##### startIndex?
|
|
32
|
+
|
|
33
|
+
`number`
|
|
30
34
|
|
|
31
35
|
The index to start in the bytes.
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
##### length?
|
|
38
|
+
|
|
39
|
+
`number`
|
|
34
40
|
|
|
35
41
|
The length of bytes to read.
|
|
36
42
|
|
|
@@ -50,7 +56,9 @@ Convert a UTF8 string to raw array.
|
|
|
50
56
|
|
|
51
57
|
#### Parameters
|
|
52
58
|
|
|
53
|
-
|
|
59
|
+
##### utf8
|
|
60
|
+
|
|
61
|
+
`string`
|
|
54
62
|
|
|
55
63
|
The text to decode.
|
|
56
64
|
|
|
@@ -64,29 +72,39 @@ The array.
|
|
|
64
72
|
|
|
65
73
|
### bytesToHex()
|
|
66
74
|
|
|
67
|
-
> `static` **bytesToHex**(`array`, `includePrefix`, `startIndex
|
|
75
|
+
> `static` **bytesToHex**(`array`, `includePrefix`, `startIndex?`, `length?`, `reverse?`): `string`
|
|
68
76
|
|
|
69
77
|
Encode a raw array to hex string.
|
|
70
78
|
|
|
71
79
|
#### Parameters
|
|
72
80
|
|
|
73
|
-
|
|
81
|
+
##### array
|
|
82
|
+
|
|
83
|
+
`ArrayLike`\<`number`\>
|
|
74
84
|
|
|
75
85
|
The bytes to encode.
|
|
76
86
|
|
|
77
|
-
|
|
87
|
+
##### includePrefix
|
|
88
|
+
|
|
89
|
+
`boolean` = `false`
|
|
78
90
|
|
|
79
91
|
Include the 0x prefix on the returned hex.
|
|
80
92
|
|
|
81
|
-
|
|
93
|
+
##### startIndex?
|
|
94
|
+
|
|
95
|
+
`number`
|
|
82
96
|
|
|
83
97
|
The index to start in the bytes.
|
|
84
98
|
|
|
85
|
-
|
|
99
|
+
##### length?
|
|
100
|
+
|
|
101
|
+
`number`
|
|
86
102
|
|
|
87
103
|
The length of bytes to read.
|
|
88
104
|
|
|
89
|
-
|
|
105
|
+
##### reverse?
|
|
106
|
+
|
|
107
|
+
`boolean`
|
|
90
108
|
|
|
91
109
|
Reverse the combine direction.
|
|
92
110
|
|
|
@@ -100,17 +118,21 @@ The array formatted as hex.
|
|
|
100
118
|
|
|
101
119
|
### hexToBytes()
|
|
102
120
|
|
|
103
|
-
> `static` **hexToBytes**(`hex`, `reverse
|
|
121
|
+
> `static` **hexToBytes**(`hex`, `reverse?`): `Uint8Array`
|
|
104
122
|
|
|
105
123
|
Decode a hex string to raw array.
|
|
106
124
|
|
|
107
125
|
#### Parameters
|
|
108
126
|
|
|
109
|
-
|
|
127
|
+
##### hex
|
|
128
|
+
|
|
129
|
+
`string`
|
|
110
130
|
|
|
111
131
|
The hex to decode.
|
|
112
132
|
|
|
113
|
-
|
|
133
|
+
##### reverse?
|
|
134
|
+
|
|
135
|
+
`boolean`
|
|
114
136
|
|
|
115
137
|
Store the characters in reverse.
|
|
116
138
|
|
|
@@ -130,11 +152,15 @@ Convert the UTF8 to hex.
|
|
|
130
152
|
|
|
131
153
|
#### Parameters
|
|
132
154
|
|
|
133
|
-
|
|
155
|
+
##### utf8
|
|
156
|
+
|
|
157
|
+
`string`
|
|
134
158
|
|
|
135
159
|
The text to convert.
|
|
136
160
|
|
|
137
|
-
|
|
161
|
+
##### includePrefix
|
|
162
|
+
|
|
163
|
+
`boolean` = `false`
|
|
138
164
|
|
|
139
165
|
Include the 0x prefix on the returned hex.
|
|
140
166
|
|
|
@@ -154,7 +180,9 @@ Convert the hex text to text.
|
|
|
154
180
|
|
|
155
181
|
#### Parameters
|
|
156
182
|
|
|
157
|
-
|
|
183
|
+
##### hex
|
|
184
|
+
|
|
185
|
+
`string`
|
|
158
186
|
|
|
159
187
|
The hex to convert.
|
|
160
188
|
|
|
@@ -174,7 +202,9 @@ Convert bytes to binary string.
|
|
|
174
202
|
|
|
175
203
|
#### Parameters
|
|
176
204
|
|
|
177
|
-
|
|
205
|
+
##### bytes
|
|
206
|
+
|
|
207
|
+
`Uint8Array`
|
|
178
208
|
|
|
179
209
|
The bytes to convert.
|
|
180
210
|
|
|
@@ -194,7 +224,9 @@ Convert a binary string to bytes.
|
|
|
194
224
|
|
|
195
225
|
#### Parameters
|
|
196
226
|
|
|
197
|
-
|
|
227
|
+
##### binary
|
|
228
|
+
|
|
229
|
+
`string`
|
|
198
230
|
|
|
199
231
|
The binary string.
|
|
200
232
|
|
|
@@ -214,7 +246,9 @@ Convert bytes to base64 string.
|
|
|
214
246
|
|
|
215
247
|
#### Parameters
|
|
216
248
|
|
|
217
|
-
|
|
249
|
+
##### bytes
|
|
250
|
+
|
|
251
|
+
`Uint8Array`
|
|
218
252
|
|
|
219
253
|
The bytes to convert.
|
|
220
254
|
|
|
@@ -234,7 +268,9 @@ Convert a base64 string to bytes.
|
|
|
234
268
|
|
|
235
269
|
#### Parameters
|
|
236
270
|
|
|
237
|
-
|
|
271
|
+
##### base64
|
|
272
|
+
|
|
273
|
+
`string`
|
|
238
274
|
|
|
239
275
|
The base64 string.
|
|
240
276
|
|
|
@@ -254,7 +290,9 @@ Convert bytes to base64 url string.
|
|
|
254
290
|
|
|
255
291
|
#### Parameters
|
|
256
292
|
|
|
257
|
-
|
|
293
|
+
##### bytes
|
|
294
|
+
|
|
295
|
+
`Uint8Array`
|
|
258
296
|
|
|
259
297
|
The bytes to convert.
|
|
260
298
|
|
|
@@ -274,7 +312,9 @@ Convert a base64 url string to bytes.
|
|
|
274
312
|
|
|
275
313
|
#### Parameters
|
|
276
314
|
|
|
277
|
-
|
|
315
|
+
##### base64Url
|
|
316
|
+
|
|
317
|
+
`string`
|
|
278
318
|
|
|
279
319
|
The base64 url string.
|
|
280
320
|
|
|
@@ -294,7 +334,9 @@ Convert bytes to base58 string.
|
|
|
294
334
|
|
|
295
335
|
#### Parameters
|
|
296
336
|
|
|
297
|
-
|
|
337
|
+
##### bytes
|
|
338
|
+
|
|
339
|
+
`Uint8Array`
|
|
298
340
|
|
|
299
341
|
The bytes to convert.
|
|
300
342
|
|
|
@@ -314,7 +356,9 @@ Convert a base58 string to bytes.
|
|
|
314
356
|
|
|
315
357
|
#### Parameters
|
|
316
358
|
|
|
317
|
-
|
|
359
|
+
##### base58
|
|
360
|
+
|
|
361
|
+
`string`
|
|
318
362
|
|
|
319
363
|
The base58 string.
|
|
320
364
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Class: EnvHelper
|
|
2
|
+
|
|
3
|
+
Environment variable helper.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
> **new EnvHelper**(): `EnvHelper`
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
`EnvHelper`
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
### envToJson()
|
|
18
|
+
|
|
19
|
+
> `static` **envToJson**\<`T`\>(`envVars`, `prefix?`): `T`
|
|
20
|
+
|
|
21
|
+
Get the environment variable as an object with camel cased names.
|
|
22
|
+
|
|
23
|
+
#### Type Parameters
|
|
24
|
+
|
|
25
|
+
##### T
|
|
26
|
+
|
|
27
|
+
`T` = \{[`id`: `string`]: `string`; \}
|
|
28
|
+
|
|
29
|
+
#### Parameters
|
|
30
|
+
|
|
31
|
+
##### envVars
|
|
32
|
+
|
|
33
|
+
The environment variables.
|
|
34
|
+
|
|
35
|
+
##### prefix?
|
|
36
|
+
|
|
37
|
+
`string`
|
|
38
|
+
|
|
39
|
+
The prefix of the environment variables, if not provided gets all.
|
|
40
|
+
|
|
41
|
+
#### Returns
|
|
42
|
+
|
|
43
|
+
`T`
|
|
44
|
+
|
|
45
|
+
The object with camel cased names.
|
|
@@ -4,28 +4,36 @@ Error helper functions.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new ErrorHelper**():
|
|
9
|
+
> **new ErrorHelper**(): `ErrorHelper`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`ErrorHelper`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
17
|
### formatErrors()
|
|
18
18
|
|
|
19
|
-
> `static` **formatErrors**(`error`): `string`[]
|
|
19
|
+
> `static` **formatErrors**(`error`, `includeDetails?`): `string`[]
|
|
20
20
|
|
|
21
21
|
Format Errors and returns just their messages.
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##### error
|
|
26
|
+
|
|
27
|
+
`unknown`
|
|
26
28
|
|
|
27
29
|
The error to format.
|
|
28
30
|
|
|
31
|
+
##### includeDetails?
|
|
32
|
+
|
|
33
|
+
`boolean`
|
|
34
|
+
|
|
35
|
+
Whether to include error details, defaults to false.
|
|
36
|
+
|
|
29
37
|
#### Returns
|
|
30
38
|
|
|
31
39
|
`string`[]
|
|
@@ -42,7 +50,9 @@ Localize the content of an error and any inner errors.
|
|
|
42
50
|
|
|
43
51
|
#### Parameters
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
##### error
|
|
54
|
+
|
|
55
|
+
`unknown`
|
|
46
56
|
|
|
47
57
|
The error to format.
|
|
48
58
|
|
|
@@ -62,7 +72,9 @@ Localize the content of an error and any inner errors.
|
|
|
62
72
|
|
|
63
73
|
#### Parameters
|
|
64
74
|
|
|
65
|
-
|
|
75
|
+
##### error
|
|
76
|
+
|
|
77
|
+
[`IError`](../interfaces/IError.md)
|
|
66
78
|
|
|
67
79
|
The error to format.
|
|
68
80
|
|
|
@@ -4,42 +4,90 @@ Factory for creating implementation of generic types.
|
|
|
4
4
|
|
|
5
5
|
## Type Parameters
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### T
|
|
8
|
+
|
|
9
|
+
`T`
|
|
8
10
|
|
|
9
11
|
## Methods
|
|
10
12
|
|
|
11
13
|
### createFactory()
|
|
12
14
|
|
|
13
|
-
> `static` **createFactory**\<`U`\>(`typeName`, `autoInstance`, `matcher
|
|
15
|
+
> `static` **createFactory**\<`U`\>(`typeName`, `autoInstance`, `matcher?`): `Factory`\<`U`\>
|
|
14
16
|
|
|
15
17
|
Create a new factory, which is shared throughout all library instances.
|
|
16
18
|
|
|
17
19
|
#### Type Parameters
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
##### U
|
|
22
|
+
|
|
23
|
+
`U`
|
|
20
24
|
|
|
21
25
|
#### Parameters
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
##### typeName
|
|
28
|
+
|
|
29
|
+
`string`
|
|
24
30
|
|
|
25
31
|
The type name for the instances.
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
##### autoInstance
|
|
34
|
+
|
|
35
|
+
`boolean` = `false`
|
|
28
36
|
|
|
29
37
|
Automatically create an instance when registered.
|
|
30
38
|
|
|
31
|
-
|
|
39
|
+
##### matcher?
|
|
40
|
+
|
|
41
|
+
(`names`, `name`) => `undefined` \| `string`
|
|
32
42
|
|
|
33
43
|
Match the name of the instance.
|
|
34
44
|
|
|
35
45
|
#### Returns
|
|
36
46
|
|
|
37
|
-
|
|
47
|
+
`Factory`\<`U`\>
|
|
38
48
|
|
|
39
49
|
The factory instance.
|
|
40
50
|
|
|
41
51
|
***
|
|
42
52
|
|
|
53
|
+
### getFactories()
|
|
54
|
+
|
|
55
|
+
> `static` **getFactories**(): `object`
|
|
56
|
+
|
|
57
|
+
Get all the factories.
|
|
58
|
+
|
|
59
|
+
#### Returns
|
|
60
|
+
|
|
61
|
+
`object`
|
|
62
|
+
|
|
63
|
+
All the factories.
|
|
64
|
+
|
|
65
|
+
***
|
|
66
|
+
|
|
67
|
+
### resetFactories()
|
|
68
|
+
|
|
69
|
+
> `static` **resetFactories**(): `void`
|
|
70
|
+
|
|
71
|
+
Reset all the factories, which removes any created instances, but not the registrations.
|
|
72
|
+
|
|
73
|
+
#### Returns
|
|
74
|
+
|
|
75
|
+
`void`
|
|
76
|
+
|
|
77
|
+
***
|
|
78
|
+
|
|
79
|
+
### clearFactories()
|
|
80
|
+
|
|
81
|
+
> `static` **clearFactories**(): `void`
|
|
82
|
+
|
|
83
|
+
Clear all the factories, which removes anything registered with the factories.
|
|
84
|
+
|
|
85
|
+
#### Returns
|
|
86
|
+
|
|
87
|
+
`void`
|
|
88
|
+
|
|
89
|
+
***
|
|
90
|
+
|
|
43
91
|
### register()
|
|
44
92
|
|
|
45
93
|
> **register**\<`U`\>(`name`, `generator`): `void`
|
|
@@ -48,15 +96,21 @@ Register a new generator.
|
|
|
48
96
|
|
|
49
97
|
#### Type Parameters
|
|
50
98
|
|
|
51
|
-
|
|
99
|
+
##### U
|
|
100
|
+
|
|
101
|
+
`U`
|
|
52
102
|
|
|
53
103
|
#### Parameters
|
|
54
104
|
|
|
55
|
-
|
|
105
|
+
##### name
|
|
106
|
+
|
|
107
|
+
`string`
|
|
56
108
|
|
|
57
109
|
The name of the generator.
|
|
58
110
|
|
|
59
|
-
|
|
111
|
+
##### generator
|
|
112
|
+
|
|
113
|
+
() => `U`
|
|
60
114
|
|
|
61
115
|
The function to create an instance.
|
|
62
116
|
|
|
@@ -74,7 +128,9 @@ Unregister a generator.
|
|
|
74
128
|
|
|
75
129
|
#### Parameters
|
|
76
130
|
|
|
77
|
-
|
|
131
|
+
##### name
|
|
132
|
+
|
|
133
|
+
`string`
|
|
78
134
|
|
|
79
135
|
The name of the generator to unregister.
|
|
80
136
|
|
|
@@ -100,11 +156,15 @@ Get a generator instance.
|
|
|
100
156
|
|
|
101
157
|
#### Type Parameters
|
|
102
158
|
|
|
103
|
-
|
|
159
|
+
##### U
|
|
160
|
+
|
|
161
|
+
`U`
|
|
104
162
|
|
|
105
163
|
#### Parameters
|
|
106
164
|
|
|
107
|
-
|
|
165
|
+
##### name
|
|
166
|
+
|
|
167
|
+
`string`
|
|
108
168
|
|
|
109
169
|
The name of the instance to generate.
|
|
110
170
|
|
|
@@ -132,11 +192,15 @@ Get a generator instance with no exceptions.
|
|
|
132
192
|
|
|
133
193
|
#### Type Parameters
|
|
134
194
|
|
|
135
|
-
|
|
195
|
+
##### U
|
|
196
|
+
|
|
197
|
+
`U`
|
|
136
198
|
|
|
137
199
|
#### Parameters
|
|
138
200
|
|
|
139
|
-
|
|
201
|
+
##### name
|
|
202
|
+
|
|
203
|
+
`string`
|
|
140
204
|
|
|
141
205
|
The name of the instance to generate.
|
|
142
206
|
|
|
@@ -152,7 +216,19 @@ An instance of the item or undefined if it does not exist.
|
|
|
152
216
|
|
|
153
217
|
> **reset**(): `void`
|
|
154
218
|
|
|
155
|
-
|
|
219
|
+
Remove all the instances and leave the generators intact.
|
|
220
|
+
|
|
221
|
+
#### Returns
|
|
222
|
+
|
|
223
|
+
`void`
|
|
224
|
+
|
|
225
|
+
***
|
|
226
|
+
|
|
227
|
+
### clear()
|
|
228
|
+
|
|
229
|
+
> **clear**(): `void`
|
|
230
|
+
|
|
231
|
+
Remove all the instances and the generators.
|
|
156
232
|
|
|
157
233
|
#### Returns
|
|
158
234
|
|
|
@@ -210,7 +286,9 @@ Does the factory contain the name.
|
|
|
210
286
|
|
|
211
287
|
#### Parameters
|
|
212
288
|
|
|
213
|
-
|
|
289
|
+
##### name
|
|
290
|
+
|
|
291
|
+
`string`
|
|
214
292
|
|
|
215
293
|
The name of the instance to find.
|
|
216
294
|
|
|
@@ -4,13 +4,13 @@ Class to help with filenames.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new FilenameHelper**():
|
|
9
|
+
> **new FilenameHelper**(): `FilenameHelper`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`FilenameHelper`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -22,7 +22,9 @@ Replaces any unsafe characters in the filename.
|
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##### filename
|
|
26
|
+
|
|
27
|
+
`unknown`
|
|
26
28
|
|
|
27
29
|
The filename to make safe.
|
|
28
30
|
|