@twin.org/core 0.0.3-next.8 → 0.0.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/README.md +1 -9
- package/dist/es/encoding/base32.js +1 -1
- package/dist/es/encoding/base32.js.map +1 -1
- package/dist/es/encoding/base64.js +1 -1
- package/dist/es/encoding/base64.js.map +1 -1
- package/dist/es/errors/alreadyExistsError.js +1 -1
- package/dist/es/errors/alreadyExistsError.js.map +1 -1
- package/dist/es/errors/baseError.js +1 -1
- package/dist/es/errors/baseError.js.map +1 -1
- package/dist/es/errors/conflictError.js +1 -1
- package/dist/es/errors/conflictError.js.map +1 -1
- package/dist/es/errors/generalError.js +1 -1
- package/dist/es/errors/generalError.js.map +1 -1
- package/dist/es/errors/guardError.js +1 -1
- package/dist/es/errors/guardError.js.map +1 -1
- package/dist/es/errors/notFoundError.js +1 -1
- package/dist/es/errors/notFoundError.js.map +1 -1
- package/dist/es/errors/notSupportedError.js +1 -1
- package/dist/es/errors/notSupportedError.js.map +1 -1
- package/dist/es/errors/unauthorizedError.js +2 -2
- package/dist/es/errors/unauthorizedError.js.map +1 -1
- package/dist/es/errors/unprocessableError.js +1 -1
- package/dist/es/errors/unprocessableError.js.map +1 -1
- package/dist/es/factories/factory.js +41 -0
- package/dist/es/factories/factory.js.map +1 -1
- package/dist/es/helpers/arrayHelper.js +2 -0
- package/dist/es/helpers/arrayHelper.js.map +1 -1
- package/dist/es/helpers/errorHelper.js +18 -14
- package/dist/es/helpers/errorHelper.js.map +1 -1
- package/dist/es/helpers/jsonHelper.js.map +1 -1
- package/dist/es/helpers/objectHelper.js +12 -36
- package/dist/es/helpers/objectHelper.js.map +1 -1
- package/dist/es/helpers/randomHelper.js +50 -2
- package/dist/es/helpers/randomHelper.js.map +1 -1
- package/dist/es/helpers/stringHelper.js +11 -0
- package/dist/es/helpers/stringHelper.js.map +1 -1
- package/dist/es/index.js +8 -1
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IComponent.js +0 -2
- package/dist/es/models/IComponent.js.map +1 -1
- package/dist/es/models/IError.js.map +1 -1
- package/dist/es/models/IHealth.js +2 -0
- package/dist/es/models/IHealth.js.map +1 -0
- package/dist/es/models/IMutexWorkerMessage.js +2 -0
- package/dist/es/models/IMutexWorkerMessage.js.map +1 -0
- package/dist/es/models/healthStatus.js +21 -0
- package/dist/es/models/healthStatus.js.map +1 -0
- package/dist/es/models/mutexMessageTypes.js +13 -0
- package/dist/es/models/mutexMessageTypes.js.map +1 -0
- 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/types/singleOccurrenceArrayDepthHelper.js +2 -0
- package/dist/es/types/singleOccurrenceArrayDepthHelper.js.map +1 -0
- package/dist/es/types/urn.js +1 -2
- package/dist/es/types/urn.js.map +1 -1
- package/dist/es/utils/asyncCache.js +236 -88
- package/dist/es/utils/asyncCache.js.map +1 -1
- package/dist/es/utils/guards.js +16 -0
- package/dist/es/utils/guards.js.map +1 -1
- package/dist/es/utils/i18n.js.map +1 -1
- package/dist/es/utils/is.js +16 -0
- package/dist/es/utils/is.js.map +1 -1
- package/dist/es/utils/mutex.js +185 -0
- package/dist/es/utils/mutex.js.map +1 -0
- package/dist/types/encoding/base32.d.ts +1 -1
- package/dist/types/errors/alreadyExistsError.d.ts +1 -1
- package/dist/types/errors/baseError.d.ts +1 -1
- package/dist/types/errors/conflictError.d.ts +1 -1
- package/dist/types/errors/generalError.d.ts +1 -1
- package/dist/types/errors/guardError.d.ts +1 -1
- package/dist/types/errors/notFoundError.d.ts +1 -1
- package/dist/types/errors/notSupportedError.d.ts +1 -1
- package/dist/types/errors/unauthorizedError.d.ts +2 -2
- package/dist/types/errors/unprocessableError.d.ts +1 -1
- package/dist/types/factories/factory.d.ts +23 -1
- package/dist/types/helpers/arrayHelper.d.ts +1 -8
- package/dist/types/helpers/errorHelper.d.ts +11 -4
- package/dist/types/helpers/objectHelper.d.ts +18 -14
- package/dist/types/helpers/randomHelper.d.ts +16 -0
- package/dist/types/helpers/stringHelper.d.ts +6 -0
- package/dist/types/index.d.ts +8 -1
- package/dist/types/models/IComponent.d.ts +12 -0
- package/dist/types/models/IError.d.ts +1 -1
- package/dist/types/models/IHealth.d.ts +32 -0
- package/dist/types/models/IMutexWorkerMessage.d.ts +23 -0
- package/dist/types/models/healthStatus.d.ts +21 -0
- package/dist/types/models/mutexMessageTypes.d.ts +13 -0
- package/dist/types/types/singleOccurrenceArray.d.ts +6 -0
- package/dist/types/types/singleOccurrenceArrayDepthHelper.d.ts +4 -0
- package/dist/types/utils/asyncCache.d.ts +11 -3
- package/dist/types/utils/guards.d.ts +10 -1
- package/dist/types/utils/is.d.ts +7 -0
- package/dist/types/utils/mutex.d.ts +53 -0
- package/docs/changelog.md +945 -216
- package/docs/examples.md +308 -1
- package/docs/reference/classes/AlreadyExistsError.md +36 -36
- package/docs/reference/classes/ArrayHelper.md +10 -44
- package/docs/reference/classes/AsyncCache.md +13 -12
- 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 +35 -35
- 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 +36 -36
- package/docs/reference/classes/Converter.md +18 -18
- package/docs/reference/classes/EnvHelper.md +1 -1
- package/docs/reference/classes/ErrorHelper.md +20 -10
- package/docs/reference/classes/Factory.md +112 -18
- package/docs/reference/classes/FilenameHelper.md +1 -1
- package/docs/reference/classes/GeneralError.md +36 -36
- package/docs/reference/classes/GuardError.md +36 -36
- package/docs/reference/classes/Guards.md +72 -30
- package/docs/reference/classes/HexHelper.md +6 -6
- package/docs/reference/classes/I18n.md +14 -14
- package/docs/reference/classes/Is.md +67 -39
- package/docs/reference/classes/JsonHelper.md +10 -10
- package/docs/reference/classes/Mutex.md +128 -0
- package/docs/reference/classes/NotFoundError.md +36 -36
- package/docs/reference/classes/NotImplementedError.md +35 -35
- package/docs/reference/classes/NotSupportedError.md +36 -36
- package/docs/reference/classes/NumberHelper.md +2 -2
- package/docs/reference/classes/ObjectHelper.md +135 -73
- package/docs/reference/classes/RandomHelper.md +53 -1
- package/docs/reference/classes/SharedStore.md +3 -3
- package/docs/reference/classes/StringHelper.md +45 -23
- package/docs/reference/classes/Uint8ArrayHelper.md +1 -1
- package/docs/reference/classes/UnauthorizedError.md +37 -37
- package/docs/reference/classes/UnprocessableError.md +36 -36
- package/docs/reference/classes/Url.md +8 -8
- package/docs/reference/classes/Urn.md +24 -24
- package/docs/reference/classes/Validation.md +25 -25
- package/docs/reference/classes/ValidationError.md +35 -35
- package/docs/reference/index.md +9 -0
- package/docs/reference/interfaces/IComponent.md +40 -4
- package/docs/reference/interfaces/IError.md +11 -11
- package/docs/reference/interfaces/IHealth.md +55 -0
- 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/ILocaleDictionary.md +1 -1
- package/docs/reference/interfaces/ILocalesIndex.md +1 -1
- package/docs/reference/interfaces/IMutexWorkerMessage.md +35 -0
- package/docs/reference/interfaces/IPatchOperation.md +6 -6
- package/docs/reference/interfaces/IUrlParts.md +9 -9
- package/docs/reference/interfaces/IValidationFailure.md +4 -4
- package/docs/reference/type-aliases/HealthStatus.md +5 -0
- package/docs/reference/type-aliases/MutexMessageTypes.md +5 -0
- 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/docs/reference/variables/HealthStatus.md +25 -0
- package/docs/reference/variables/MutexMessageTypes.md +13 -0
- package/locales/en.json +11 -2
- package/package.json +6 -6
- 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
|
@@ -26,7 +26,7 @@ The source of the error.
|
|
|
26
26
|
|
|
27
27
|
`string`
|
|
28
28
|
|
|
29
|
-
The message as
|
|
29
|
+
The message as an i18n key.
|
|
30
30
|
|
|
31
31
|
##### properties?
|
|
32
32
|
|
|
@@ -48,9 +48,9 @@ The cause of the error if we have wrapped another error.
|
|
|
48
48
|
|
|
49
49
|
## Properties
|
|
50
50
|
|
|
51
|
-
### source?
|
|
51
|
+
### source? {#source}
|
|
52
52
|
|
|
53
|
-
> `optional` **source
|
|
53
|
+
> `optional` **source?**: `string`
|
|
54
54
|
|
|
55
55
|
The source of the error.
|
|
56
56
|
|
|
@@ -60,9 +60,9 @@ The source of the error.
|
|
|
60
60
|
|
|
61
61
|
***
|
|
62
62
|
|
|
63
|
-
### properties?
|
|
63
|
+
### properties? {#properties}
|
|
64
64
|
|
|
65
|
-
> `optional` **properties
|
|
65
|
+
> `optional` **properties?**: `object`
|
|
66
66
|
|
|
67
67
|
Any additional information for the error.
|
|
68
68
|
|
|
@@ -76,9 +76,9 @@ Any additional information for the error.
|
|
|
76
76
|
|
|
77
77
|
***
|
|
78
78
|
|
|
79
|
-
### cause?
|
|
79
|
+
### cause? {#cause}
|
|
80
80
|
|
|
81
|
-
> `optional` **cause
|
|
81
|
+
> `optional` **cause?**: [`IError`](../interfaces/IError.md)
|
|
82
82
|
|
|
83
83
|
The cause of the error.
|
|
84
84
|
|
|
@@ -88,7 +88,7 @@ The cause of the error.
|
|
|
88
88
|
|
|
89
89
|
***
|
|
90
90
|
|
|
91
|
-
### CLASS\_NAME
|
|
91
|
+
### CLASS\_NAME {#class_name}
|
|
92
92
|
|
|
93
93
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
94
94
|
|
|
@@ -96,7 +96,7 @@ Runtime name for the class.
|
|
|
96
96
|
|
|
97
97
|
## Methods
|
|
98
98
|
|
|
99
|
-
### fromError()
|
|
99
|
+
### fromError() {#fromerror}
|
|
100
100
|
|
|
101
101
|
> `static` **fromError**(`err`): [`BaseError`](BaseError.md)
|
|
102
102
|
|
|
@@ -122,7 +122,7 @@ The new instance.
|
|
|
122
122
|
|
|
123
123
|
***
|
|
124
124
|
|
|
125
|
-
### flatten()
|
|
125
|
+
### flatten() {#flatten}
|
|
126
126
|
|
|
127
127
|
> `static` **flatten**(`err`): [`IError`](../interfaces/IError.md)[]
|
|
128
128
|
|
|
@@ -148,7 +148,7 @@ The list of all internal errors.
|
|
|
148
148
|
|
|
149
149
|
***
|
|
150
150
|
|
|
151
|
-
### expand()
|
|
151
|
+
### expand() {#expand}
|
|
152
152
|
|
|
153
153
|
> `static` **expand**(`errors`): [`IError`](../interfaces/IError.md) \| `undefined`
|
|
154
154
|
|
|
@@ -158,9 +158,9 @@ Expand an error tree.
|
|
|
158
158
|
|
|
159
159
|
##### errors
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
[`IError`](../interfaces/IError.md)[] \| `undefined`
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
The list of errors to expand.
|
|
164
164
|
|
|
165
165
|
#### Returns
|
|
166
166
|
|
|
@@ -174,7 +174,7 @@ The first level error.
|
|
|
174
174
|
|
|
175
175
|
***
|
|
176
176
|
|
|
177
|
-
### isErrorName()
|
|
177
|
+
### isErrorName() {#iserrorname}
|
|
178
178
|
|
|
179
179
|
> `static` **isErrorName**(`error`, `name`): `error is BaseError`
|
|
180
180
|
|
|
@@ -190,9 +190,9 @@ The error to test.
|
|
|
190
190
|
|
|
191
191
|
##### name
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
`string` \| `RegExp`
|
|
194
194
|
|
|
195
|
-
|
|
195
|
+
The name to check for.
|
|
196
196
|
|
|
197
197
|
#### Returns
|
|
198
198
|
|
|
@@ -206,7 +206,7 @@ True if the error has the name.
|
|
|
206
206
|
|
|
207
207
|
***
|
|
208
208
|
|
|
209
|
-
### isErrorMessage()
|
|
209
|
+
### isErrorMessage() {#iserrormessage}
|
|
210
210
|
|
|
211
211
|
> `static` **isErrorMessage**(`error`, `message`): `error is BaseError`
|
|
212
212
|
|
|
@@ -222,9 +222,9 @@ The error to test.
|
|
|
222
222
|
|
|
223
223
|
##### message
|
|
224
224
|
|
|
225
|
-
|
|
225
|
+
`string` \| `RegExp`
|
|
226
226
|
|
|
227
|
-
|
|
227
|
+
The message to check for.
|
|
228
228
|
|
|
229
229
|
#### Returns
|
|
230
230
|
|
|
@@ -238,7 +238,7 @@ True if the error has the name.
|
|
|
238
238
|
|
|
239
239
|
***
|
|
240
240
|
|
|
241
|
-
### isErrorCode()
|
|
241
|
+
### isErrorCode() {#iserrorcode}
|
|
242
242
|
|
|
243
243
|
> `static` **isErrorCode**(`error`, `code`): `boolean`
|
|
244
244
|
|
|
@@ -254,9 +254,9 @@ The error to test.
|
|
|
254
254
|
|
|
255
255
|
##### code
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
`string` \| `RegExp`
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
The code to check for.
|
|
260
260
|
|
|
261
261
|
#### Returns
|
|
262
262
|
|
|
@@ -270,7 +270,7 @@ True if the error has the code.
|
|
|
270
270
|
|
|
271
271
|
***
|
|
272
272
|
|
|
273
|
-
### someErrorName()
|
|
273
|
+
### someErrorName() {#someerrorname}
|
|
274
274
|
|
|
275
275
|
> `static` **someErrorName**(`error`, `name`): `error is BaseError`
|
|
276
276
|
|
|
@@ -286,9 +286,9 @@ The error to test.
|
|
|
286
286
|
|
|
287
287
|
##### name
|
|
288
288
|
|
|
289
|
-
|
|
289
|
+
`string` \| `RegExp`
|
|
290
290
|
|
|
291
|
-
|
|
291
|
+
The name to check for.
|
|
292
292
|
|
|
293
293
|
#### Returns
|
|
294
294
|
|
|
@@ -302,7 +302,7 @@ True if the error has the name.
|
|
|
302
302
|
|
|
303
303
|
***
|
|
304
304
|
|
|
305
|
-
### someErrorMessage()
|
|
305
|
+
### someErrorMessage() {#someerrormessage}
|
|
306
306
|
|
|
307
307
|
> `static` **someErrorMessage**(`error`, `message`): `error is BaseError`
|
|
308
308
|
|
|
@@ -318,9 +318,9 @@ The error to test.
|
|
|
318
318
|
|
|
319
319
|
##### message
|
|
320
320
|
|
|
321
|
-
|
|
321
|
+
`string` \| `RegExp`
|
|
322
322
|
|
|
323
|
-
|
|
323
|
+
The message to check for.
|
|
324
324
|
|
|
325
325
|
#### Returns
|
|
326
326
|
|
|
@@ -334,7 +334,7 @@ True if the error has the name.
|
|
|
334
334
|
|
|
335
335
|
***
|
|
336
336
|
|
|
337
|
-
### someErrorClass()
|
|
337
|
+
### someErrorClass() {#someerrorclass}
|
|
338
338
|
|
|
339
339
|
> `static` **someErrorClass**(`error`, `cls`): `error is BaseError`
|
|
340
340
|
|
|
@@ -366,7 +366,7 @@ True if the error has the specific class.
|
|
|
366
366
|
|
|
367
367
|
***
|
|
368
368
|
|
|
369
|
-
### someErrorCode()
|
|
369
|
+
### someErrorCode() {#someerrorcode}
|
|
370
370
|
|
|
371
371
|
> `static` **someErrorCode**(`error`, `code`): `error is BaseError`
|
|
372
372
|
|
|
@@ -382,9 +382,9 @@ The error to test.
|
|
|
382
382
|
|
|
383
383
|
##### code
|
|
384
384
|
|
|
385
|
-
|
|
385
|
+
`string` \| `RegExp`
|
|
386
386
|
|
|
387
|
-
|
|
387
|
+
The code to check for.
|
|
388
388
|
|
|
389
389
|
#### Returns
|
|
390
390
|
|
|
@@ -398,7 +398,7 @@ True if the error has the name.
|
|
|
398
398
|
|
|
399
399
|
***
|
|
400
400
|
|
|
401
|
-
### isEmpty()
|
|
401
|
+
### isEmpty() {#isempty}
|
|
402
402
|
|
|
403
403
|
> `static` **isEmpty**(`err`): `boolean`
|
|
404
404
|
|
|
@@ -424,7 +424,7 @@ True if the error is empty.
|
|
|
424
424
|
|
|
425
425
|
***
|
|
426
426
|
|
|
427
|
-
### isAggregateError()
|
|
427
|
+
### isAggregateError() {#isaggregateerror}
|
|
428
428
|
|
|
429
429
|
> `static` **isAggregateError**(`err`): `err is AggregateError`
|
|
430
430
|
|
|
@@ -450,7 +450,7 @@ True if the error is an aggregate error.
|
|
|
450
450
|
|
|
451
451
|
***
|
|
452
452
|
|
|
453
|
-
### fromAggregate()
|
|
453
|
+
### fromAggregate() {#fromaggregate}
|
|
454
454
|
|
|
455
455
|
> `static` **fromAggregate**(`err`, `includeStackTrace?`): [`IError`](../interfaces/IError.md)[]
|
|
456
456
|
|
|
@@ -482,7 +482,7 @@ The array of errors.
|
|
|
482
482
|
|
|
483
483
|
***
|
|
484
484
|
|
|
485
|
-
### toJsonObject()
|
|
485
|
+
### toJsonObject() {#tojsonobject}
|
|
486
486
|
|
|
487
487
|
> **toJsonObject**(`includeStackTrace?`): [`IError`](../interfaces/IError.md)
|
|
488
488
|
|
|
@@ -14,7 +14,7 @@ Class to help with numbers.
|
|
|
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
|
-
### clamp()
|
|
25
|
+
### clamp() {#clamp}
|
|
26
26
|
|
|
27
27
|
> `static` **clamp**(`value`, `minValue?`, `maxValue?`): `number`
|
|
28
28
|
|
|
@@ -14,7 +14,7 @@ Class to help with objects.
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### CLASS\_NAME
|
|
17
|
+
### CLASS\_NAME {#class_name}
|
|
18
18
|
|
|
19
19
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
20
20
|
|
|
@@ -22,9 +22,9 @@ Runtime name for the class.
|
|
|
22
22
|
|
|
23
23
|
## Methods
|
|
24
24
|
|
|
25
|
-
### toBytes()
|
|
25
|
+
### toBytes() {#tobytes}
|
|
26
26
|
|
|
27
|
-
> `static` **toBytes**\<`T`\>(`obj`, `format
|
|
27
|
+
> `static` **toBytes**\<`T`\>(`obj`, `format?`): `Uint8Array`
|
|
28
28
|
|
|
29
29
|
Convert an object to bytes.
|
|
30
30
|
|
|
@@ -38,11 +38,11 @@ Convert an object to bytes.
|
|
|
38
38
|
|
|
39
39
|
##### obj
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
`T` \| `undefined`
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
The object to convert.
|
|
44
44
|
|
|
45
|
-
##### format
|
|
45
|
+
##### format?
|
|
46
46
|
|
|
47
47
|
`boolean` = `false`
|
|
48
48
|
|
|
@@ -56,7 +56,7 @@ The object as bytes.
|
|
|
56
56
|
|
|
57
57
|
***
|
|
58
58
|
|
|
59
|
-
### fromBytes()
|
|
59
|
+
### fromBytes() {#frombytes}
|
|
60
60
|
|
|
61
61
|
> `static` **fromBytes**\<`T`\>(`bytes`): `T`
|
|
62
62
|
|
|
@@ -72,9 +72,9 @@ Convert a bytes to an object.
|
|
|
72
72
|
|
|
73
73
|
##### bytes
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
`Uint8Array`\<`ArrayBufferLike`\> \| `null` \| `undefined`
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
The bytes to convert to an object.
|
|
78
78
|
|
|
79
79
|
#### Returns
|
|
80
80
|
|
|
@@ -88,7 +88,7 @@ GeneralError if there was an error parsing the JSON.
|
|
|
88
88
|
|
|
89
89
|
***
|
|
90
90
|
|
|
91
|
-
### clone()
|
|
91
|
+
### clone() {#clone}
|
|
92
92
|
|
|
93
93
|
> `static` **clone**\<`T`\>(`obj`): `T`
|
|
94
94
|
|
|
@@ -116,7 +116,7 @@ The objects clone.
|
|
|
116
116
|
|
|
117
117
|
***
|
|
118
118
|
|
|
119
|
-
### merge()
|
|
119
|
+
### merge() {#merge}
|
|
120
120
|
|
|
121
121
|
> `static` **merge**\<`T`, `U`\>(`obj1`, `obj2`): `T` & `U`
|
|
122
122
|
|
|
@@ -154,7 +154,7 @@ The combined deep merge of the objects.
|
|
|
154
154
|
|
|
155
155
|
***
|
|
156
156
|
|
|
157
|
-
### equal()
|
|
157
|
+
### equal() {#equal}
|
|
158
158
|
|
|
159
159
|
> `static` **equal**\<`T`\>(`obj1`, `obj2`, `strictPropertyOrder?`): `boolean`
|
|
160
160
|
|
|
@@ -194,7 +194,7 @@ True is the objects are equal.
|
|
|
194
194
|
|
|
195
195
|
***
|
|
196
196
|
|
|
197
|
-
### propertyGet()
|
|
197
|
+
### propertyGet() {#propertyget}
|
|
198
198
|
|
|
199
199
|
> `static` **propertyGet**\<`T`\>(`obj`, `property`): `T` \| `undefined`
|
|
200
200
|
|
|
@@ -228,7 +228,7 @@ The property.
|
|
|
228
228
|
|
|
229
229
|
***
|
|
230
230
|
|
|
231
|
-
### propertySet()
|
|
231
|
+
### propertySet() {#propertyset}
|
|
232
232
|
|
|
233
233
|
> `static` **propertySet**(`obj`, `property`, `value`): `void`
|
|
234
234
|
|
|
@@ -264,7 +264,7 @@ GeneralError if the property target is not an object.
|
|
|
264
264
|
|
|
265
265
|
***
|
|
266
266
|
|
|
267
|
-
### propertyDelete()
|
|
267
|
+
### propertyDelete() {#propertydelete}
|
|
268
268
|
|
|
269
269
|
> `static` **propertyDelete**(`obj`, `property`): `void`
|
|
270
270
|
|
|
@@ -276,13 +276,13 @@ Delete the property of an unknown object.
|
|
|
276
276
|
|
|
277
277
|
`unknown`
|
|
278
278
|
|
|
279
|
-
The object to
|
|
279
|
+
The object to delete the property from.
|
|
280
280
|
|
|
281
281
|
##### property
|
|
282
282
|
|
|
283
283
|
`string`
|
|
284
284
|
|
|
285
|
-
The property to
|
|
285
|
+
The property to delete.
|
|
286
286
|
|
|
287
287
|
#### Returns
|
|
288
288
|
|
|
@@ -290,9 +290,9 @@ The property to set
|
|
|
290
290
|
|
|
291
291
|
***
|
|
292
292
|
|
|
293
|
-
### extractProperty()
|
|
293
|
+
### extractProperty() {#extractproperty}
|
|
294
294
|
|
|
295
|
-
> `static` **extractProperty**\<`T`\>(`obj`, `propertyNames`, `removeProperties
|
|
295
|
+
> `static` **extractProperty**\<`T`\>(`obj`, `propertyNames`, `removeProperties?`): `T` \| `undefined`
|
|
296
296
|
|
|
297
297
|
Extract a property from the object, providing alternative names.
|
|
298
298
|
|
|
@@ -312,11 +312,11 @@ The object to extract from.
|
|
|
312
312
|
|
|
313
313
|
##### propertyNames
|
|
314
314
|
|
|
315
|
-
|
|
315
|
+
`string` \| `string`[]
|
|
316
316
|
|
|
317
|
-
|
|
317
|
+
The possible names for the property.
|
|
318
318
|
|
|
319
|
-
##### removeProperties
|
|
319
|
+
##### removeProperties?
|
|
320
320
|
|
|
321
321
|
`boolean` = `true`
|
|
322
322
|
|
|
@@ -330,117 +330,179 @@ The property if available.
|
|
|
330
330
|
|
|
331
331
|
***
|
|
332
332
|
|
|
333
|
-
### pick()
|
|
333
|
+
### pick() {#pick}
|
|
334
|
+
|
|
335
|
+
Pick a subset of properties from an object.
|
|
336
|
+
|
|
337
|
+
#### Param
|
|
338
|
+
|
|
339
|
+
The object to pick the properties from.
|
|
340
|
+
|
|
341
|
+
#### Param
|
|
342
|
+
|
|
343
|
+
The property keys to pick.
|
|
344
|
+
|
|
345
|
+
#### Call Signature
|
|
334
346
|
|
|
335
|
-
> `static` **pick**\<`T`\>(`obj`, `keys?`): `
|
|
347
|
+
> `static` **pick**\<`T`, `K`\>(`obj`, `keys?`): `Pick`\<`T`, `K`\>
|
|
336
348
|
|
|
337
349
|
Pick a subset of properties from an object.
|
|
338
350
|
|
|
339
|
-
|
|
351
|
+
##### Type Parameters
|
|
340
352
|
|
|
341
|
-
|
|
353
|
+
###### T
|
|
342
354
|
|
|
343
355
|
`T`
|
|
344
356
|
|
|
345
|
-
|
|
357
|
+
###### K
|
|
346
358
|
|
|
347
|
-
|
|
359
|
+
`K` *extends* `string` \| `number` \| `symbol`
|
|
360
|
+
|
|
361
|
+
##### Parameters
|
|
362
|
+
|
|
363
|
+
###### obj
|
|
364
|
+
|
|
365
|
+
`T`
|
|
348
366
|
|
|
349
367
|
The object to pick the properties from.
|
|
350
368
|
|
|
351
|
-
|
|
369
|
+
###### keys?
|
|
370
|
+
|
|
371
|
+
`K`[]
|
|
372
|
+
|
|
373
|
+
The property keys to pick.
|
|
374
|
+
|
|
375
|
+
##### Returns
|
|
376
|
+
|
|
377
|
+
`Pick`\<`T`, `K`\>
|
|
378
|
+
|
|
379
|
+
The picked object.
|
|
380
|
+
|
|
381
|
+
#### Call Signature
|
|
382
|
+
|
|
383
|
+
> `static` **pick**\<`T`, `K`\>(`obj`, `keys?`): `Pick`\<`T`, `K`\> \| `undefined`
|
|
384
|
+
|
|
385
|
+
Pick a subset of properties from an object.
|
|
386
|
+
|
|
387
|
+
##### Type Parameters
|
|
388
|
+
|
|
389
|
+
###### T
|
|
390
|
+
|
|
391
|
+
`T`
|
|
392
|
+
|
|
393
|
+
###### K
|
|
352
394
|
|
|
353
|
-
|
|
395
|
+
`K` *extends* `string` \| `number` \| `symbol`
|
|
354
396
|
|
|
355
|
-
|
|
397
|
+
##### Parameters
|
|
398
|
+
|
|
399
|
+
###### obj
|
|
400
|
+
|
|
401
|
+
`T` \| `undefined`
|
|
402
|
+
|
|
403
|
+
The object to pick the properties from.
|
|
404
|
+
|
|
405
|
+
###### keys?
|
|
406
|
+
|
|
407
|
+
`K`[]
|
|
356
408
|
|
|
357
409
|
The property keys to pick.
|
|
358
410
|
|
|
359
|
-
|
|
411
|
+
##### Returns
|
|
360
412
|
|
|
361
|
-
`
|
|
413
|
+
`Pick`\<`T`, `K`\> \| `undefined`
|
|
362
414
|
|
|
363
|
-
The
|
|
415
|
+
The picked object, or undefined if the input was undefined.
|
|
364
416
|
|
|
365
417
|
***
|
|
366
418
|
|
|
367
|
-
### omit()
|
|
419
|
+
### omit() {#omit}
|
|
420
|
+
|
|
421
|
+
Omit a subset of properties from an object.
|
|
422
|
+
|
|
423
|
+
#### Param
|
|
424
|
+
|
|
425
|
+
The object to omit the properties from.
|
|
426
|
+
|
|
427
|
+
#### Param
|
|
428
|
+
|
|
429
|
+
The property keys to omit.
|
|
430
|
+
|
|
431
|
+
#### Call Signature
|
|
368
432
|
|
|
369
|
-
> `static` **omit**\<`T`\>(`obj`, `keys?`): `
|
|
433
|
+
> `static` **omit**\<`T`, `K`\>(`obj`, `keys?`): `Omit`\<`T`, `K`\>
|
|
370
434
|
|
|
371
435
|
Omit a subset of properties from an object.
|
|
372
436
|
|
|
373
|
-
|
|
437
|
+
##### Type Parameters
|
|
374
438
|
|
|
375
|
-
|
|
439
|
+
###### T
|
|
376
440
|
|
|
377
441
|
`T`
|
|
378
442
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
##### obj
|
|
443
|
+
###### K
|
|
382
444
|
|
|
383
|
-
|
|
445
|
+
`K` *extends* `string` \| `number` \| `symbol`
|
|
384
446
|
|
|
385
|
-
|
|
447
|
+
##### Parameters
|
|
386
448
|
|
|
387
|
-
|
|
449
|
+
###### obj
|
|
388
450
|
|
|
389
|
-
|
|
451
|
+
`T`
|
|
390
452
|
|
|
391
|
-
The
|
|
453
|
+
The object to omit the properties from.
|
|
392
454
|
|
|
393
|
-
|
|
455
|
+
###### keys?
|
|
394
456
|
|
|
395
|
-
`
|
|
457
|
+
`K`[]
|
|
396
458
|
|
|
397
|
-
The
|
|
459
|
+
The property keys to omit.
|
|
398
460
|
|
|
399
|
-
|
|
461
|
+
##### Returns
|
|
400
462
|
|
|
401
|
-
|
|
463
|
+
`Omit`\<`T`, `K`\>
|
|
402
464
|
|
|
403
|
-
|
|
465
|
+
The object without the omitted keys.
|
|
404
466
|
|
|
405
|
-
|
|
467
|
+
#### Call Signature
|
|
406
468
|
|
|
407
|
-
|
|
469
|
+
> `static` **omit**\<`T`, `K`\>(`obj`, `keys?`): `Omit`\<`T`, `K`\> \| `undefined`
|
|
408
470
|
|
|
409
|
-
|
|
471
|
+
Omit a subset of properties from an object.
|
|
410
472
|
|
|
411
|
-
|
|
473
|
+
##### Type Parameters
|
|
412
474
|
|
|
413
|
-
|
|
475
|
+
###### T
|
|
414
476
|
|
|
415
|
-
|
|
477
|
+
`T`
|
|
416
478
|
|
|
417
|
-
|
|
479
|
+
###### K
|
|
418
480
|
|
|
419
|
-
`
|
|
481
|
+
`K` *extends* `string` \| `number` \| `symbol`
|
|
420
482
|
|
|
421
|
-
#####
|
|
483
|
+
##### Parameters
|
|
422
484
|
|
|
423
|
-
|
|
485
|
+
###### obj
|
|
424
486
|
|
|
425
|
-
|
|
487
|
+
`T` \| `undefined`
|
|
426
488
|
|
|
427
|
-
|
|
489
|
+
The object to omit the properties from.
|
|
428
490
|
|
|
429
|
-
|
|
491
|
+
###### keys?
|
|
430
492
|
|
|
431
|
-
|
|
493
|
+
`K`[]
|
|
432
494
|
|
|
433
|
-
|
|
495
|
+
The property keys to omit.
|
|
434
496
|
|
|
435
|
-
|
|
497
|
+
##### Returns
|
|
436
498
|
|
|
437
|
-
|
|
499
|
+
`Omit`\<`T`, `K`\> \| `undefined`
|
|
438
500
|
|
|
439
|
-
|
|
501
|
+
The object without the omitted keys, or undefined if the input was undefined.
|
|
440
502
|
|
|
441
503
|
***
|
|
442
504
|
|
|
443
|
-
### toExtended()
|
|
505
|
+
### toExtended() {#toextended}
|
|
444
506
|
|
|
445
507
|
> `static` **toExtended**(`obj`): `any`
|
|
446
508
|
|
|
@@ -462,7 +524,7 @@ The object with extended properties.
|
|
|
462
524
|
|
|
463
525
|
***
|
|
464
526
|
|
|
465
|
-
### fromExtended()
|
|
527
|
+
### fromExtended() {#fromextended}
|
|
466
528
|
|
|
467
529
|
> `static` **fromExtended**(`obj`): `any`
|
|
468
530
|
|
|
@@ -484,7 +546,7 @@ The object with regular properties.
|
|
|
484
546
|
|
|
485
547
|
***
|
|
486
548
|
|
|
487
|
-
### removeEmptyProperties()
|
|
549
|
+
### removeEmptyProperties() {#removeemptyproperties}
|
|
488
550
|
|
|
489
551
|
> `static` **removeEmptyProperties**\<`T`\>(`obj`, `options?`): `T`
|
|
490
552
|
|