@genesislcap/foundation-utils 14.81.0 → 14.82.0
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/custom-elements.json +82 -0
- package/dist/dts/serializers/json/index.d.ts +1 -0
- package/dist/dts/serializers/json/index.d.ts.map +1 -1
- package/dist/dts/serializers/json/json.d.ts +23 -0
- package/dist/dts/serializers/json/json.d.ts.map +1 -1
- package/dist/dts/serializers/json/json.types.d.ts +20 -0
- package/dist/dts/serializers/json/json.types.d.ts.map +1 -0
- package/dist/esm/serializers/json/index.js +1 -0
- package/dist/esm/serializers/json/json.js +44 -13
- package/dist/esm/serializers/json/json.types.js +10 -0
- package/dist/foundation-utils.api.json +379 -0
- package/dist/foundation-utils.d.ts +34 -0
- package/docs/api/foundation-utils.customnumberparser.md +24 -0
- package/docs/api/foundation-utils.defaultjsonserializerconfig.md +13 -0
- package/docs/api/foundation-utils.jsonserializerconfig.md +23 -0
- package/docs/api/foundation-utils.jsonserializerconfig.parse.md +23 -0
- package/docs/api/foundation-utils.jsonserializerconfig.parse_1.md +24 -0
- package/docs/api/foundation-utils.jsonserializerconfig.stringify.md +24 -0
- package/docs/api/foundation-utils.jsonserializerconfig.stringify_1.md +24 -0
- package/docs/api/foundation-utils.md +3 -0
- package/docs/api-report.md +28 -0
- package/package.json +6 -5
|
@@ -2348,6 +2348,14 @@
|
|
|
2348
2348
|
"package": "./json"
|
|
2349
2349
|
}
|
|
2350
2350
|
},
|
|
2351
|
+
{
|
|
2352
|
+
"kind": "js",
|
|
2353
|
+
"name": "*",
|
|
2354
|
+
"declaration": {
|
|
2355
|
+
"name": "*",
|
|
2356
|
+
"package": "./json.types"
|
|
2357
|
+
}
|
|
2358
|
+
},
|
|
2351
2359
|
{
|
|
2352
2360
|
"kind": "js",
|
|
2353
2361
|
"name": "*",
|
|
@@ -2370,6 +2378,50 @@
|
|
|
2370
2378
|
"kind": "javascript-module",
|
|
2371
2379
|
"path": "src/serializers/json/json.ts",
|
|
2372
2380
|
"declarations": [
|
|
2381
|
+
{
|
|
2382
|
+
"kind": "function",
|
|
2383
|
+
"name": "customNumberParser",
|
|
2384
|
+
"parameters": [
|
|
2385
|
+
{
|
|
2386
|
+
"name": "value"
|
|
2387
|
+
}
|
|
2388
|
+
],
|
|
2389
|
+
"description": "A Default Number Parser for deserializing objects.",
|
|
2390
|
+
"privacy": "public"
|
|
2391
|
+
},
|
|
2392
|
+
{
|
|
2393
|
+
"kind": "variable",
|
|
2394
|
+
"name": "defaultJSONSerializerConfig",
|
|
2395
|
+
"type": {
|
|
2396
|
+
"text": "JSONSerializerConfig"
|
|
2397
|
+
},
|
|
2398
|
+
"default": "{\n parse: (input: any) => parse(input, null, customNumberParser),\n stringify: (object: any) => stringify(object),\n}",
|
|
2399
|
+
"description": "A Default JSONSerializer Config for serializing and deserializing functions.",
|
|
2400
|
+
"privacy": "public"
|
|
2401
|
+
},
|
|
2402
|
+
{
|
|
2403
|
+
"kind": "class",
|
|
2404
|
+
"description": "",
|
|
2405
|
+
"name": "DefaultJSONSerializer",
|
|
2406
|
+
"members": [
|
|
2407
|
+
{
|
|
2408
|
+
"kind": "field",
|
|
2409
|
+
"name": "serialize"
|
|
2410
|
+
},
|
|
2411
|
+
{
|
|
2412
|
+
"kind": "method",
|
|
2413
|
+
"name": "deserialize",
|
|
2414
|
+
"parameters": [
|
|
2415
|
+
{
|
|
2416
|
+
"name": "input",
|
|
2417
|
+
"type": {
|
|
2418
|
+
"text": "any"
|
|
2419
|
+
}
|
|
2420
|
+
}
|
|
2421
|
+
]
|
|
2422
|
+
}
|
|
2423
|
+
]
|
|
2424
|
+
},
|
|
2373
2425
|
{
|
|
2374
2426
|
"kind": "variable",
|
|
2375
2427
|
"name": "JSONSerializer",
|
|
@@ -2378,6 +2430,30 @@
|
|
|
2378
2430
|
}
|
|
2379
2431
|
],
|
|
2380
2432
|
"exports": [
|
|
2433
|
+
{
|
|
2434
|
+
"kind": "js",
|
|
2435
|
+
"name": "customNumberParser",
|
|
2436
|
+
"declaration": {
|
|
2437
|
+
"name": "customNumberParser",
|
|
2438
|
+
"module": "src/serializers/json/json.ts"
|
|
2439
|
+
}
|
|
2440
|
+
},
|
|
2441
|
+
{
|
|
2442
|
+
"kind": "js",
|
|
2443
|
+
"name": "defaultJSONSerializerConfig",
|
|
2444
|
+
"declaration": {
|
|
2445
|
+
"name": "defaultJSONSerializerConfig",
|
|
2446
|
+
"module": "src/serializers/json/json.ts"
|
|
2447
|
+
}
|
|
2448
|
+
},
|
|
2449
|
+
{
|
|
2450
|
+
"kind": "js",
|
|
2451
|
+
"name": "default",
|
|
2452
|
+
"declaration": {
|
|
2453
|
+
"name": "DefaultJSONSerializer",
|
|
2454
|
+
"module": "src/serializers/json/json.ts"
|
|
2455
|
+
}
|
|
2456
|
+
},
|
|
2381
2457
|
{
|
|
2382
2458
|
"kind": "js",
|
|
2383
2459
|
"name": "JSONSerializer",
|
|
@@ -2388,6 +2464,12 @@
|
|
|
2388
2464
|
}
|
|
2389
2465
|
]
|
|
2390
2466
|
},
|
|
2467
|
+
{
|
|
2468
|
+
"kind": "javascript-module",
|
|
2469
|
+
"path": "src/serializers/json/json.types.ts",
|
|
2470
|
+
"declarations": [],
|
|
2471
|
+
"exports": []
|
|
2472
|
+
},
|
|
2391
2473
|
{
|
|
2392
2474
|
"kind": "javascript-module",
|
|
2393
2475
|
"path": "src/serializers/json/jsonReplacer.ts",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/serializers/json/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/serializers/json/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { JSONSerializerConfig } from './json.types';
|
|
2
|
+
/**
|
|
3
|
+
* A Default Number Parser for deserializing objects.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare function customNumberParser(value: any): number | bigint;
|
|
1
7
|
/**
|
|
2
8
|
* An interface representing a JSON serializer.
|
|
3
9
|
* @public
|
|
@@ -28,6 +34,23 @@ export interface JSONSerializer {
|
|
|
28
34
|
*/
|
|
29
35
|
deserialize<T = any>(text: string): T;
|
|
30
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* A Default JSONSerializer Config for serializing and deserializing functions.
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export declare const defaultJSONSerializerConfig: JSONSerializerConfig;
|
|
42
|
+
export default class DefaultJSONSerializer implements JSONSerializer {
|
|
43
|
+
private config;
|
|
44
|
+
constructor(config?: JSONSerializerConfig);
|
|
45
|
+
/**
|
|
46
|
+
* @inheritDoc JSONSerializer.serialize
|
|
47
|
+
*/
|
|
48
|
+
serialize: (object: any) => string;
|
|
49
|
+
/**
|
|
50
|
+
* @inheritDoc JSONSerializer.deserialize
|
|
51
|
+
*/
|
|
52
|
+
deserialize<T>(input: any): any;
|
|
53
|
+
}
|
|
31
54
|
/**
|
|
32
55
|
* A DI token for the JSON serializer.
|
|
33
56
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../src/serializers/json/json.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAAC;IAE/B;;;;OAIG;IACH,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAErD;;;;OAIG;IACH,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,YAAY,GAAG,CAAC,CAAC;IAE7C;;;;OAIG;IACH,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC;CACvC;
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../src/serializers/json/json.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAErE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,KAAA,mBAQvC;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAAC;IAE/B;;;;OAIG;IACH,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAErD;;;;OAIG;IACH,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,YAAY,GAAG,CAAC,CAAC;IAE7C;;;;OAIG;IACH,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC;CACvC;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,oBAGzC,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,cAAc;IACtB,OAAO,CAAC,MAAM;gBAAN,MAAM,uBAA8B;IAExF;;OAEG;IACH,SAAS,WAAY,GAAG,KAAG,MAAM,CAAkC;IAEnE;;OAEG;IACH,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG;CAmB1B;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,sEAE1B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export declare const BIG_INT_64_BITS = 64;
|
|
5
|
+
/**
|
|
6
|
+
* Configuration options for the JSONSerializer Config instance.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export interface JSONSerializerConfig {
|
|
10
|
+
parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
|
|
11
|
+
parse(text: string, reviver?: (this: any, key: string, value: any) => any, parseNumber?: any): any;
|
|
12
|
+
stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
13
|
+
stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Configuration options for the JSONSerializer Config instance.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare const JSONSerializerConfig: import("@microsoft/fast-foundation").InterfaceSymbol<JSONSerializerConfig>;
|
|
20
|
+
//# sourceMappingURL=json.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.types.d.ts","sourceRoot":"","sources":["../../../../src/serializers/json/json.types.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,GAAG,GAAG,CAAC;IAChF,KAAK,CACH,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,EACrD,WAAW,CAAC,EAAE,GAAG,GAChB,GAAG,CAAC;IACP,SAAS,CACP,KAAK,EAAE,GAAG,EACV,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,EACtD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GACtB,MAAM,CAAC;IACV,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAC/F;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,4EAA6C,CAAC"}
|
|
@@ -1,28 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { __decorate, __param } from "tslib";
|
|
2
|
+
import { DI, optional } from '@microsoft/fast-foundation';
|
|
3
|
+
import { parse, stringify, isInteger } from 'lossless-json';
|
|
4
|
+
import { BIG_INT_64_BITS, JSONSerializerConfig } from './json.types';
|
|
5
|
+
/**
|
|
6
|
+
* A Default Number Parser for deserializing objects.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export function customNumberParser(value) {
|
|
10
|
+
if (Number.isSafeInteger(+value)) {
|
|
11
|
+
return Number(value);
|
|
12
|
+
}
|
|
13
|
+
if (!isInteger(value)) {
|
|
14
|
+
return parseFloat(value);
|
|
15
|
+
}
|
|
16
|
+
return BigInt.asIntN(BIG_INT_64_BITS, value);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A Default JSONSerializer Config for serializing and deserializing functions.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export const defaultJSONSerializerConfig = {
|
|
23
|
+
parse: (input) => parse(input, null, customNumberParser),
|
|
24
|
+
stringify: (object) => stringify(object),
|
|
25
|
+
};
|
|
26
|
+
let DefaultJSONSerializer = class DefaultJSONSerializer {
|
|
27
|
+
constructor(config = defaultJSONSerializerConfig) {
|
|
28
|
+
this.config = config;
|
|
4
29
|
/**
|
|
5
|
-
*
|
|
6
|
-
* @param object - The object to serialize.
|
|
7
|
-
* @returns The serialized JSON string.
|
|
30
|
+
* @inheritDoc JSONSerializer.serialize
|
|
8
31
|
*/
|
|
9
|
-
this.serialize = (object) =>
|
|
32
|
+
this.serialize = (object) => this.config.stringify(object);
|
|
10
33
|
}
|
|
11
34
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @param input - The HTTP response object.
|
|
14
|
-
* @returns A promise that resolves to the deserialized JavaScript object.
|
|
35
|
+
* @inheritDoc JSONSerializer.deserialize
|
|
15
36
|
*/
|
|
16
37
|
deserialize(input) {
|
|
38
|
+
if (!input) {
|
|
39
|
+
return Promise.resolve({});
|
|
40
|
+
}
|
|
41
|
+
if (typeof input === 'string') {
|
|
42
|
+
return this.config.parse(input);
|
|
43
|
+
}
|
|
17
44
|
if (input && input.ok) {
|
|
18
|
-
return input.text().then((text) =>
|
|
45
|
+
return input.text().then((text) => this.config.parse(text));
|
|
19
46
|
}
|
|
20
47
|
if (input && input.data) {
|
|
21
48
|
input = input.data;
|
|
22
49
|
}
|
|
23
|
-
return
|
|
50
|
+
return this.config.parse(input);
|
|
24
51
|
}
|
|
25
|
-
}
|
|
52
|
+
};
|
|
53
|
+
DefaultJSONSerializer = __decorate([
|
|
54
|
+
__param(0, optional(JSONSerializerConfig))
|
|
55
|
+
], DefaultJSONSerializer);
|
|
56
|
+
export default DefaultJSONSerializer;
|
|
26
57
|
/**
|
|
27
58
|
* A DI token for the JSON serializer.
|
|
28
59
|
* @public
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DI } from '@microsoft/fast-foundation';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export const BIG_INT_64_BITS = 64;
|
|
6
|
+
/**
|
|
7
|
+
* Configuration options for the JSONSerializer Config instance.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export const JSONSerializerConfig = DI.createInterface();
|
|
@@ -543,6 +543,51 @@
|
|
|
543
543
|
"endIndex": 4
|
|
544
544
|
}
|
|
545
545
|
},
|
|
546
|
+
{
|
|
547
|
+
"kind": "Function",
|
|
548
|
+
"canonicalReference": "@genesislcap/foundation-utils!customNumberParser:function(1)",
|
|
549
|
+
"docComment": "/**\n * A Default Number Parser for deserializing objects.\n *\n * @public\n */\n",
|
|
550
|
+
"excerptTokens": [
|
|
551
|
+
{
|
|
552
|
+
"kind": "Content",
|
|
553
|
+
"text": "export declare function customNumberParser(value: "
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"kind": "Content",
|
|
557
|
+
"text": "any"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"kind": "Content",
|
|
561
|
+
"text": "): "
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"kind": "Content",
|
|
565
|
+
"text": "number | bigint"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"kind": "Content",
|
|
569
|
+
"text": ";"
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
"fileUrlPath": "src/serializers/json/json.ts",
|
|
573
|
+
"returnTypeTokenRange": {
|
|
574
|
+
"startIndex": 3,
|
|
575
|
+
"endIndex": 4
|
|
576
|
+
},
|
|
577
|
+
"releaseTag": "Public",
|
|
578
|
+
"overloadIndex": 1,
|
|
579
|
+
"parameters": [
|
|
580
|
+
{
|
|
581
|
+
"parameterName": "value",
|
|
582
|
+
"parameterTypeTokenRange": {
|
|
583
|
+
"startIndex": 1,
|
|
584
|
+
"endIndex": 2
|
|
585
|
+
},
|
|
586
|
+
"isOptional": false
|
|
587
|
+
}
|
|
588
|
+
],
|
|
589
|
+
"name": "customNumberParser"
|
|
590
|
+
},
|
|
546
591
|
{
|
|
547
592
|
"kind": "Interface",
|
|
548
593
|
"canonicalReference": "@genesislcap/foundation-utils!Database:interface",
|
|
@@ -2110,6 +2155,30 @@
|
|
|
2110
2155
|
"endIndex": 5
|
|
2111
2156
|
}
|
|
2112
2157
|
},
|
|
2158
|
+
{
|
|
2159
|
+
"kind": "Variable",
|
|
2160
|
+
"canonicalReference": "@genesislcap/foundation-utils!defaultJSONSerializerConfig:var",
|
|
2161
|
+
"docComment": "/**\n * A Default JSONSerializer Config for serializing and deserializing functions.\n *\n * @public\n */\n",
|
|
2162
|
+
"excerptTokens": [
|
|
2163
|
+
{
|
|
2164
|
+
"kind": "Content",
|
|
2165
|
+
"text": "defaultJSONSerializerConfig: "
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
"kind": "Reference",
|
|
2169
|
+
"text": "JSONSerializerConfig",
|
|
2170
|
+
"canonicalReference": "@genesislcap/foundation-utils!JSONSerializerConfig:interface"
|
|
2171
|
+
}
|
|
2172
|
+
],
|
|
2173
|
+
"fileUrlPath": "src/serializers/json/json.ts",
|
|
2174
|
+
"isReadonly": true,
|
|
2175
|
+
"releaseTag": "Public",
|
|
2176
|
+
"name": "defaultJSONSerializerConfig",
|
|
2177
|
+
"variableTypeTokenRange": {
|
|
2178
|
+
"startIndex": 1,
|
|
2179
|
+
"endIndex": 2
|
|
2180
|
+
}
|
|
2181
|
+
},
|
|
2113
2182
|
{
|
|
2114
2183
|
"kind": "Variable",
|
|
2115
2184
|
"canonicalReference": "@genesislcap/foundation-utils!defaultLoggerOptions:var",
|
|
@@ -4431,6 +4500,316 @@
|
|
|
4431
4500
|
"endIndex": 6
|
|
4432
4501
|
}
|
|
4433
4502
|
},
|
|
4503
|
+
{
|
|
4504
|
+
"kind": "Interface",
|
|
4505
|
+
"canonicalReference": "@genesislcap/foundation-utils!JSONSerializerConfig:interface",
|
|
4506
|
+
"docComment": "/**\n * Configuration options for the JSONSerializer Config instance.\n *\n * @public\n */\n",
|
|
4507
|
+
"excerptTokens": [
|
|
4508
|
+
{
|
|
4509
|
+
"kind": "Content",
|
|
4510
|
+
"text": "export interface JSONSerializerConfig "
|
|
4511
|
+
}
|
|
4512
|
+
],
|
|
4513
|
+
"fileUrlPath": "src/serializers/json/json.types.ts",
|
|
4514
|
+
"releaseTag": "Public",
|
|
4515
|
+
"name": "JSONSerializerConfig",
|
|
4516
|
+
"preserveMemberOrder": false,
|
|
4517
|
+
"members": [
|
|
4518
|
+
{
|
|
4519
|
+
"kind": "MethodSignature",
|
|
4520
|
+
"canonicalReference": "@genesislcap/foundation-utils!JSONSerializerConfig#parse:member(1)",
|
|
4521
|
+
"docComment": "",
|
|
4522
|
+
"excerptTokens": [
|
|
4523
|
+
{
|
|
4524
|
+
"kind": "Content",
|
|
4525
|
+
"text": "parse(text: "
|
|
4526
|
+
},
|
|
4527
|
+
{
|
|
4528
|
+
"kind": "Content",
|
|
4529
|
+
"text": "string"
|
|
4530
|
+
},
|
|
4531
|
+
{
|
|
4532
|
+
"kind": "Content",
|
|
4533
|
+
"text": ", reviver?: "
|
|
4534
|
+
},
|
|
4535
|
+
{
|
|
4536
|
+
"kind": "Content",
|
|
4537
|
+
"text": "(this: any, key: string, value: any) => any"
|
|
4538
|
+
},
|
|
4539
|
+
{
|
|
4540
|
+
"kind": "Content",
|
|
4541
|
+
"text": "): "
|
|
4542
|
+
},
|
|
4543
|
+
{
|
|
4544
|
+
"kind": "Content",
|
|
4545
|
+
"text": "any"
|
|
4546
|
+
},
|
|
4547
|
+
{
|
|
4548
|
+
"kind": "Content",
|
|
4549
|
+
"text": ";"
|
|
4550
|
+
}
|
|
4551
|
+
],
|
|
4552
|
+
"isOptional": false,
|
|
4553
|
+
"returnTypeTokenRange": {
|
|
4554
|
+
"startIndex": 5,
|
|
4555
|
+
"endIndex": 6
|
|
4556
|
+
},
|
|
4557
|
+
"releaseTag": "Public",
|
|
4558
|
+
"overloadIndex": 1,
|
|
4559
|
+
"parameters": [
|
|
4560
|
+
{
|
|
4561
|
+
"parameterName": "text",
|
|
4562
|
+
"parameterTypeTokenRange": {
|
|
4563
|
+
"startIndex": 1,
|
|
4564
|
+
"endIndex": 2
|
|
4565
|
+
},
|
|
4566
|
+
"isOptional": false
|
|
4567
|
+
},
|
|
4568
|
+
{
|
|
4569
|
+
"parameterName": "reviver",
|
|
4570
|
+
"parameterTypeTokenRange": {
|
|
4571
|
+
"startIndex": 3,
|
|
4572
|
+
"endIndex": 4
|
|
4573
|
+
},
|
|
4574
|
+
"isOptional": true
|
|
4575
|
+
}
|
|
4576
|
+
],
|
|
4577
|
+
"name": "parse"
|
|
4578
|
+
},
|
|
4579
|
+
{
|
|
4580
|
+
"kind": "MethodSignature",
|
|
4581
|
+
"canonicalReference": "@genesislcap/foundation-utils!JSONSerializerConfig#parse:member(2)",
|
|
4582
|
+
"docComment": "",
|
|
4583
|
+
"excerptTokens": [
|
|
4584
|
+
{
|
|
4585
|
+
"kind": "Content",
|
|
4586
|
+
"text": "parse(text: "
|
|
4587
|
+
},
|
|
4588
|
+
{
|
|
4589
|
+
"kind": "Content",
|
|
4590
|
+
"text": "string"
|
|
4591
|
+
},
|
|
4592
|
+
{
|
|
4593
|
+
"kind": "Content",
|
|
4594
|
+
"text": ", reviver?: "
|
|
4595
|
+
},
|
|
4596
|
+
{
|
|
4597
|
+
"kind": "Content",
|
|
4598
|
+
"text": "(this: any, key: string, value: any) => any"
|
|
4599
|
+
},
|
|
4600
|
+
{
|
|
4601
|
+
"kind": "Content",
|
|
4602
|
+
"text": ", parseNumber?: "
|
|
4603
|
+
},
|
|
4604
|
+
{
|
|
4605
|
+
"kind": "Content",
|
|
4606
|
+
"text": "any"
|
|
4607
|
+
},
|
|
4608
|
+
{
|
|
4609
|
+
"kind": "Content",
|
|
4610
|
+
"text": "): "
|
|
4611
|
+
},
|
|
4612
|
+
{
|
|
4613
|
+
"kind": "Content",
|
|
4614
|
+
"text": "any"
|
|
4615
|
+
},
|
|
4616
|
+
{
|
|
4617
|
+
"kind": "Content",
|
|
4618
|
+
"text": ";"
|
|
4619
|
+
}
|
|
4620
|
+
],
|
|
4621
|
+
"isOptional": false,
|
|
4622
|
+
"returnTypeTokenRange": {
|
|
4623
|
+
"startIndex": 7,
|
|
4624
|
+
"endIndex": 8
|
|
4625
|
+
},
|
|
4626
|
+
"releaseTag": "Public",
|
|
4627
|
+
"overloadIndex": 2,
|
|
4628
|
+
"parameters": [
|
|
4629
|
+
{
|
|
4630
|
+
"parameterName": "text",
|
|
4631
|
+
"parameterTypeTokenRange": {
|
|
4632
|
+
"startIndex": 1,
|
|
4633
|
+
"endIndex": 2
|
|
4634
|
+
},
|
|
4635
|
+
"isOptional": false
|
|
4636
|
+
},
|
|
4637
|
+
{
|
|
4638
|
+
"parameterName": "reviver",
|
|
4639
|
+
"parameterTypeTokenRange": {
|
|
4640
|
+
"startIndex": 3,
|
|
4641
|
+
"endIndex": 4
|
|
4642
|
+
},
|
|
4643
|
+
"isOptional": true
|
|
4644
|
+
},
|
|
4645
|
+
{
|
|
4646
|
+
"parameterName": "parseNumber",
|
|
4647
|
+
"parameterTypeTokenRange": {
|
|
4648
|
+
"startIndex": 5,
|
|
4649
|
+
"endIndex": 6
|
|
4650
|
+
},
|
|
4651
|
+
"isOptional": true
|
|
4652
|
+
}
|
|
4653
|
+
],
|
|
4654
|
+
"name": "parse"
|
|
4655
|
+
},
|
|
4656
|
+
{
|
|
4657
|
+
"kind": "MethodSignature",
|
|
4658
|
+
"canonicalReference": "@genesislcap/foundation-utils!JSONSerializerConfig#stringify:member(1)",
|
|
4659
|
+
"docComment": "",
|
|
4660
|
+
"excerptTokens": [
|
|
4661
|
+
{
|
|
4662
|
+
"kind": "Content",
|
|
4663
|
+
"text": "stringify(value: "
|
|
4664
|
+
},
|
|
4665
|
+
{
|
|
4666
|
+
"kind": "Content",
|
|
4667
|
+
"text": "any"
|
|
4668
|
+
},
|
|
4669
|
+
{
|
|
4670
|
+
"kind": "Content",
|
|
4671
|
+
"text": ", replacer?: "
|
|
4672
|
+
},
|
|
4673
|
+
{
|
|
4674
|
+
"kind": "Content",
|
|
4675
|
+
"text": "(this: any, key: string, value: any) => any"
|
|
4676
|
+
},
|
|
4677
|
+
{
|
|
4678
|
+
"kind": "Content",
|
|
4679
|
+
"text": ", space?: "
|
|
4680
|
+
},
|
|
4681
|
+
{
|
|
4682
|
+
"kind": "Content",
|
|
4683
|
+
"text": "string | number"
|
|
4684
|
+
},
|
|
4685
|
+
{
|
|
4686
|
+
"kind": "Content",
|
|
4687
|
+
"text": "): "
|
|
4688
|
+
},
|
|
4689
|
+
{
|
|
4690
|
+
"kind": "Content",
|
|
4691
|
+
"text": "string"
|
|
4692
|
+
},
|
|
4693
|
+
{
|
|
4694
|
+
"kind": "Content",
|
|
4695
|
+
"text": ";"
|
|
4696
|
+
}
|
|
4697
|
+
],
|
|
4698
|
+
"isOptional": false,
|
|
4699
|
+
"returnTypeTokenRange": {
|
|
4700
|
+
"startIndex": 7,
|
|
4701
|
+
"endIndex": 8
|
|
4702
|
+
},
|
|
4703
|
+
"releaseTag": "Public",
|
|
4704
|
+
"overloadIndex": 1,
|
|
4705
|
+
"parameters": [
|
|
4706
|
+
{
|
|
4707
|
+
"parameterName": "value",
|
|
4708
|
+
"parameterTypeTokenRange": {
|
|
4709
|
+
"startIndex": 1,
|
|
4710
|
+
"endIndex": 2
|
|
4711
|
+
},
|
|
4712
|
+
"isOptional": false
|
|
4713
|
+
},
|
|
4714
|
+
{
|
|
4715
|
+
"parameterName": "replacer",
|
|
4716
|
+
"parameterTypeTokenRange": {
|
|
4717
|
+
"startIndex": 3,
|
|
4718
|
+
"endIndex": 4
|
|
4719
|
+
},
|
|
4720
|
+
"isOptional": true
|
|
4721
|
+
},
|
|
4722
|
+
{
|
|
4723
|
+
"parameterName": "space",
|
|
4724
|
+
"parameterTypeTokenRange": {
|
|
4725
|
+
"startIndex": 5,
|
|
4726
|
+
"endIndex": 6
|
|
4727
|
+
},
|
|
4728
|
+
"isOptional": true
|
|
4729
|
+
}
|
|
4730
|
+
],
|
|
4731
|
+
"name": "stringify"
|
|
4732
|
+
},
|
|
4733
|
+
{
|
|
4734
|
+
"kind": "MethodSignature",
|
|
4735
|
+
"canonicalReference": "@genesislcap/foundation-utils!JSONSerializerConfig#stringify:member(2)",
|
|
4736
|
+
"docComment": "",
|
|
4737
|
+
"excerptTokens": [
|
|
4738
|
+
{
|
|
4739
|
+
"kind": "Content",
|
|
4740
|
+
"text": "stringify(value: "
|
|
4741
|
+
},
|
|
4742
|
+
{
|
|
4743
|
+
"kind": "Content",
|
|
4744
|
+
"text": "any"
|
|
4745
|
+
},
|
|
4746
|
+
{
|
|
4747
|
+
"kind": "Content",
|
|
4748
|
+
"text": ", replacer?: "
|
|
4749
|
+
},
|
|
4750
|
+
{
|
|
4751
|
+
"kind": "Content",
|
|
4752
|
+
"text": "(number | string)[] | null"
|
|
4753
|
+
},
|
|
4754
|
+
{
|
|
4755
|
+
"kind": "Content",
|
|
4756
|
+
"text": ", space?: "
|
|
4757
|
+
},
|
|
4758
|
+
{
|
|
4759
|
+
"kind": "Content",
|
|
4760
|
+
"text": "string | number"
|
|
4761
|
+
},
|
|
4762
|
+
{
|
|
4763
|
+
"kind": "Content",
|
|
4764
|
+
"text": "): "
|
|
4765
|
+
},
|
|
4766
|
+
{
|
|
4767
|
+
"kind": "Content",
|
|
4768
|
+
"text": "string"
|
|
4769
|
+
},
|
|
4770
|
+
{
|
|
4771
|
+
"kind": "Content",
|
|
4772
|
+
"text": ";"
|
|
4773
|
+
}
|
|
4774
|
+
],
|
|
4775
|
+
"isOptional": false,
|
|
4776
|
+
"returnTypeTokenRange": {
|
|
4777
|
+
"startIndex": 7,
|
|
4778
|
+
"endIndex": 8
|
|
4779
|
+
},
|
|
4780
|
+
"releaseTag": "Public",
|
|
4781
|
+
"overloadIndex": 2,
|
|
4782
|
+
"parameters": [
|
|
4783
|
+
{
|
|
4784
|
+
"parameterName": "value",
|
|
4785
|
+
"parameterTypeTokenRange": {
|
|
4786
|
+
"startIndex": 1,
|
|
4787
|
+
"endIndex": 2
|
|
4788
|
+
},
|
|
4789
|
+
"isOptional": false
|
|
4790
|
+
},
|
|
4791
|
+
{
|
|
4792
|
+
"parameterName": "replacer",
|
|
4793
|
+
"parameterTypeTokenRange": {
|
|
4794
|
+
"startIndex": 3,
|
|
4795
|
+
"endIndex": 4
|
|
4796
|
+
},
|
|
4797
|
+
"isOptional": true
|
|
4798
|
+
},
|
|
4799
|
+
{
|
|
4800
|
+
"parameterName": "space",
|
|
4801
|
+
"parameterTypeTokenRange": {
|
|
4802
|
+
"startIndex": 5,
|
|
4803
|
+
"endIndex": 6
|
|
4804
|
+
},
|
|
4805
|
+
"isOptional": true
|
|
4806
|
+
}
|
|
4807
|
+
],
|
|
4808
|
+
"name": "stringify"
|
|
4809
|
+
}
|
|
4810
|
+
],
|
|
4811
|
+
"extendsTokenRanges": []
|
|
4812
|
+
},
|
|
4434
4813
|
{
|
|
4435
4814
|
"kind": "Variable",
|
|
4436
4815
|
"canonicalReference": "@genesislcap/foundation-utils!layoutCacheDocument:var",
|
|
@@ -32,6 +32,11 @@ export declare let API_HOST: string;
|
|
|
32
32
|
*/
|
|
33
33
|
export declare function assureDesignSystem(module: DesignSystemModule): DesignSystemModule;
|
|
34
34
|
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export declare const BIG_INT_64_BITS = 64;
|
|
39
|
+
|
|
35
40
|
/**
|
|
36
41
|
* @public
|
|
37
42
|
*/
|
|
@@ -77,6 +82,12 @@ export declare function createLogger(name: string, options?: LoggerOptions): Log
|
|
|
77
82
|
*/
|
|
78
83
|
export declare const createObserver: <EventType>() => Observer<EventType>;
|
|
79
84
|
|
|
85
|
+
/**
|
|
86
|
+
* A Default Number Parser for deserializing objects.
|
|
87
|
+
* @public
|
|
88
|
+
*/
|
|
89
|
+
export declare function customNumberParser(value: any): number | bigint;
|
|
90
|
+
|
|
80
91
|
/**
|
|
81
92
|
* Represents a database with basic CRUD operations.
|
|
82
93
|
* @public
|
|
@@ -218,6 +229,12 @@ export declare class DefaultErrorMap<TErrorDetailMap extends ErrorDetailMap> imp
|
|
|
218
229
|
*/
|
|
219
230
|
export declare const defaultEventMap: Map<string, EventName>;
|
|
220
231
|
|
|
232
|
+
/**
|
|
233
|
+
* A Default JSONSerializer Config for serializing and deserializing functions.
|
|
234
|
+
* @public
|
|
235
|
+
*/
|
|
236
|
+
export declare const defaultJSONSerializerConfig: JSONSerializerConfig;
|
|
237
|
+
|
|
221
238
|
/**
|
|
222
239
|
* The default logger options.
|
|
223
240
|
* @public
|
|
@@ -509,6 +526,23 @@ export declare interface JSONSerializer {
|
|
|
509
526
|
*/
|
|
510
527
|
export declare const JSONSerializer: InterfaceSymbol<JSONSerializer>;
|
|
511
528
|
|
|
529
|
+
/**
|
|
530
|
+
* Configuration options for the JSONSerializer Config instance.
|
|
531
|
+
* @public
|
|
532
|
+
*/
|
|
533
|
+
export declare interface JSONSerializerConfig {
|
|
534
|
+
parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
|
|
535
|
+
parse(text: string, reviver?: (this: any, key: string, value: any) => any, parseNumber?: any): any;
|
|
536
|
+
stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
537
|
+
stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Configuration options for the JSONSerializer Config instance.
|
|
542
|
+
* @internal
|
|
543
|
+
*/
|
|
544
|
+
export declare const JSONSerializerConfig: InterfaceSymbol<JSONSerializerConfig>;
|
|
545
|
+
|
|
512
546
|
/**
|
|
513
547
|
* Signifies the internal document fragment that stores the master copy
|
|
514
548
|
* of the layout item, not part of the DOM.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-utils](./foundation-utils.md) > [customNumberParser](./foundation-utils.customnumberparser.md)
|
|
4
|
+
|
|
5
|
+
## customNumberParser() function
|
|
6
|
+
|
|
7
|
+
A Default Number Parser for deserializing objects.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function customNumberParser(value: any): number | bigint;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| value | any | |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
number \| bigint
|
|
24
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-utils](./foundation-utils.md) > [defaultJSONSerializerConfig](./foundation-utils.defaultjsonserializerconfig.md)
|
|
4
|
+
|
|
5
|
+
## defaultJSONSerializerConfig variable
|
|
6
|
+
|
|
7
|
+
A Default JSONSerializer Config for serializing and deserializing functions.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
defaultJSONSerializerConfig: JSONSerializerConfig
|
|
13
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-utils](./foundation-utils.md) > [JSONSerializerConfig](./foundation-utils.jsonserializerconfig.md)
|
|
4
|
+
|
|
5
|
+
## JSONSerializerConfig interface
|
|
6
|
+
|
|
7
|
+
Configuration options for the JSONSerializer Config instance.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface JSONSerializerConfig
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
| Method | Description |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| [parse(text, reviver)](./foundation-utils.jsonserializerconfig.parse.md) | |
|
|
20
|
+
| [parse(text, reviver, parseNumber)](./foundation-utils.jsonserializerconfig.parse_1.md) | |
|
|
21
|
+
| [stringify(value, replacer, space)](./foundation-utils.jsonserializerconfig.stringify.md) | |
|
|
22
|
+
| [stringify(value, replacer, space)](./foundation-utils.jsonserializerconfig.stringify_1.md) | |
|
|
23
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-utils](./foundation-utils.md) > [JSONSerializerConfig](./foundation-utils.jsonserializerconfig.md) > [parse](./foundation-utils.jsonserializerconfig.parse.md)
|
|
4
|
+
|
|
5
|
+
## JSONSerializerConfig.parse() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| text | string | |
|
|
18
|
+
| reviver | (this: any, key: string, value: any) => any | _(Optional)_ |
|
|
19
|
+
|
|
20
|
+
**Returns:**
|
|
21
|
+
|
|
22
|
+
any
|
|
23
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-utils](./foundation-utils.md) > [JSONSerializerConfig](./foundation-utils.jsonserializerconfig.md) > [parse](./foundation-utils.jsonserializerconfig.parse_1.md)
|
|
4
|
+
|
|
5
|
+
## JSONSerializerConfig.parse() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
parse(text: string, reviver?: (this: any, key: string, value: any) => any, parseNumber?: any): any;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| text | string | |
|
|
18
|
+
| reviver | (this: any, key: string, value: any) => any | _(Optional)_ |
|
|
19
|
+
| parseNumber | any | _(Optional)_ |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
any
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-utils](./foundation-utils.md) > [JSONSerializerConfig](./foundation-utils.jsonserializerconfig.md) > [stringify](./foundation-utils.jsonserializerconfig.stringify.md)
|
|
4
|
+
|
|
5
|
+
## JSONSerializerConfig.stringify() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| value | any | |
|
|
18
|
+
| replacer | (this: any, key: string, value: any) => any | _(Optional)_ |
|
|
19
|
+
| space | string \| number | _(Optional)_ |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
string
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-utils](./foundation-utils.md) > [JSONSerializerConfig](./foundation-utils.jsonserializerconfig.md) > [stringify](./foundation-utils.jsonserializerconfig.stringify_1.md)
|
|
4
|
+
|
|
5
|
+
## JSONSerializerConfig.stringify() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| value | any | |
|
|
18
|
+
| replacer | (number \| string)\[\] \| null | _(Optional)_ |
|
|
19
|
+
| space | string \| number | _(Optional)_ |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
string
|
|
24
|
+
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
| --- | --- |
|
|
29
29
|
| [assureDesignSystem(module)](./foundation-utils.assuredesignsystem.md) | |
|
|
30
30
|
| [createLogger(name, options)](./foundation-utils.createlogger.md) | Creates a logger with the given name and options. |
|
|
31
|
+
| [customNumberParser(value)](./foundation-utils.customnumberparser.md) | A Default Number Parser for deserializing objects. |
|
|
31
32
|
| [formatDateTimestamp(timestamp)](./foundation-utils.formatdatetimestamp.md) | Formats \[DATE\] UNIX Timestamps (without time) to readable strings |
|
|
32
33
|
| [formatDateTimeTimestamp(timestamp)](./foundation-utils.formatdatetimetimestamp.md) | Formats \[DATETIME\] UNIX Timestamps (with time) to readable strings |
|
|
33
34
|
| [formatTimestamp(timestamp, withTime)](./foundation-utils.formattimestamp.md) | Formats \[DATE\|DATETIME\] Unix Timestamps to readable strings |
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
| [DTOMapper](./foundation-utils.dtomapper.md) | |
|
|
48
49
|
| [ErrorMap](./foundation-utils.errormap.md) | |
|
|
49
50
|
| [JSONSerializer](./foundation-utils.jsonserializer.md) | An interface representing a JSON serializer. |
|
|
51
|
+
| [JSONSerializerConfig](./foundation-utils.jsonserializerconfig.md) | Configuration options for the JSONSerializer Config instance. |
|
|
50
52
|
| [Logger](./foundation-utils.logger.md) | A logger that extends the <code>Consola</code> logger. |
|
|
51
53
|
| [LoggerOptions](./foundation-utils.loggeroptions.md) | Options for creating a logger. |
|
|
52
54
|
| [Observer](./foundation-utils.observer.md) | Represents an event observer that manages the subscription and publication of events. |
|
|
@@ -73,6 +75,7 @@
|
|
|
73
75
|
| [DEFAULT\_PASSWORD](./foundation-utils.default_password.md) | The default Password value, used in auth/login flow \[<code>genesislcap-foundation-login</code>\](https://link-to-docs). |
|
|
74
76
|
| [DEFAULT\_USER](./foundation-utils.default_user.md) | The default Username value, used in auth/login flow \[<code>genesislcap-foundation-login</code>\](https://link-to-docs). |
|
|
75
77
|
| [defaultEventMap](./foundation-utils.defaulteventmap.md) | A map that associates specific HTML element tags with their corresponding default event names. |
|
|
78
|
+
| [defaultJSONSerializerConfig](./foundation-utils.defaultjsonserializerconfig.md) | A Default JSONSerializer Config for serializing and deserializing functions. |
|
|
76
79
|
| [defaultLoggerOptions](./foundation-utils.defaultloggeroptions.md) | The default logger options. |
|
|
77
80
|
| [FORCE\_HTTP](./foundation-utils.force_http.md) | The path to a JSON config file for the HTTP mode. |
|
|
78
81
|
| [getFontMixin](./foundation-utils.getfontmixin.md) | Generates a CSS mixin for the specified font family, style, and weight. |
|
package/docs/api-report.md
CHANGED
|
@@ -27,6 +27,11 @@ export let API_HOST: string;
|
|
|
27
27
|
// @public (undocumented)
|
|
28
28
|
export function assureDesignSystem(module: DesignSystemModule): DesignSystemModule;
|
|
29
29
|
|
|
30
|
+
// Warning: (ae-internal-missing-underscore) The name "BIG_INT_64_BITS" should be prefixed with an underscore because the declaration is marked as @internal
|
|
31
|
+
//
|
|
32
|
+
// @internal (undocumented)
|
|
33
|
+
export const BIG_INT_64_BITS = 64;
|
|
34
|
+
|
|
30
35
|
// @public (undocumented)
|
|
31
36
|
export type ConstructableLifecycleHandler = Constructable<FASTElement & HTMLElement>;
|
|
32
37
|
|
|
@@ -45,6 +50,9 @@ export function createLogger(name: string, options?: LoggerOptions): Logger;
|
|
|
45
50
|
// @public
|
|
46
51
|
export const createObserver: <EventType>() => Observer<EventType>;
|
|
47
52
|
|
|
53
|
+
// @public
|
|
54
|
+
export function customNumberParser(value: any): number | bigint;
|
|
55
|
+
|
|
48
56
|
// @public
|
|
49
57
|
export interface Database<T extends DatabaseRecord> {
|
|
50
58
|
// (undocumented)
|
|
@@ -140,6 +148,9 @@ export class DefaultErrorMap<TErrorDetailMap extends ErrorDetailMap> implements
|
|
|
140
148
|
// @public
|
|
141
149
|
export const defaultEventMap: Map<string, EventName>;
|
|
142
150
|
|
|
151
|
+
// @public
|
|
152
|
+
export const defaultJSONSerializerConfig: JSONSerializerConfig;
|
|
153
|
+
|
|
143
154
|
// @public
|
|
144
155
|
export const defaultLoggerOptions: LoggerOptions;
|
|
145
156
|
|
|
@@ -298,6 +309,23 @@ export interface JSONSerializer {
|
|
|
298
309
|
// @public
|
|
299
310
|
export const JSONSerializer: InterfaceSymbol<JSONSerializer>;
|
|
300
311
|
|
|
312
|
+
// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "JSONSerializerConfig" because one of its declarations is marked as @internal
|
|
313
|
+
//
|
|
314
|
+
// @public
|
|
315
|
+
export interface JSONSerializerConfig {
|
|
316
|
+
// (undocumented)
|
|
317
|
+
parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
|
|
318
|
+
// (undocumented)
|
|
319
|
+
parse(text: string, reviver?: (this: any, key: string, value: any) => any, parseNumber?: any): any;
|
|
320
|
+
// (undocumented)
|
|
321
|
+
stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
322
|
+
// (undocumented)
|
|
323
|
+
stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// @internal
|
|
327
|
+
export const JSONSerializerConfig: InterfaceSymbol<JSONSerializerConfig>;
|
|
328
|
+
|
|
301
329
|
// Warning: (ae-internal-missing-underscore) The name "LayoutCacheContainer" should be prefixed with an underscore because the declaration is marked as @internal
|
|
302
330
|
//
|
|
303
331
|
// @internal
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-utils",
|
|
3
3
|
"description": "Genesis Foundation Utils",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.82.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -16,16 +16,17 @@
|
|
|
16
16
|
"test": "genx test"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@genesislcap/foundation-testing": "14.
|
|
20
|
-
"@genesislcap/genx": "14.
|
|
19
|
+
"@genesislcap/foundation-testing": "14.82.0",
|
|
20
|
+
"@genesislcap/genx": "14.82.0",
|
|
21
21
|
"rimraf": "^3.0.2"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@genesislcap/foundation-logger": "14.
|
|
24
|
+
"@genesislcap/foundation-logger": "14.82.0",
|
|
25
25
|
"@microsoft/fast-components": "^2.21.3",
|
|
26
26
|
"@microsoft/fast-element": "^1.7.0",
|
|
27
27
|
"@microsoft/fast-foundation": "^2.33.2",
|
|
28
28
|
"consola": "^2.15.3",
|
|
29
|
+
"lossless-json": "^2.0.11",
|
|
29
30
|
"tslib": "^2.3.1",
|
|
30
31
|
"uuid": "^8.3.2"
|
|
31
32
|
},
|
|
@@ -38,5 +39,5 @@
|
|
|
38
39
|
"access": "public"
|
|
39
40
|
},
|
|
40
41
|
"customElements": "dist/custom-elements.json",
|
|
41
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "69108b95942ed1e47c3cf1eaf9fd3c3ed9188de0"
|
|
42
43
|
}
|