@tstdl/base 0.91.50 → 0.91.52
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/ai/data-extracting.d.ts +1 -0
- package/ai/data-extracting.js +62 -0
- package/authentication/server/authentication.api-controller.js +4 -4
- package/cancellation/token.d.ts +1 -2
- package/cancellation/token.js +1 -1
- package/core.d.ts +1 -1
- package/core.js +1 -1
- package/document-management/api/document-management.api.d.ts +753 -0
- package/document-management/api/document-management.api.js +222 -0
- package/document-management/api/index.d.ts +1 -0
- package/document-management/api/index.js +1 -0
- package/document-management/drizzle/0000_wakeful_firebrand.sql +228 -0
- package/document-management/drizzle/meta/0000_snapshot.json +1538 -0
- package/document-management/drizzle/meta/_journal.json +13 -0
- package/document-management/drizzle.config.d.ts +2 -0
- package/document-management/drizzle.config.js +11 -0
- package/document-management/index.d.ts +5 -0
- package/document-management/index.js +5 -0
- package/document-management/localizations/english.d.ts +2 -0
- package/document-management/localizations/english.js +9 -0
- package/document-management/localizations/german.d.ts +2 -0
- package/document-management/localizations/german.js +9 -0
- package/document-management/localizations/index.d.ts +5 -0
- package/document-management/localizations/index.js +9 -0
- package/document-management/localizations/localization.d.ts +9 -0
- package/document-management/localizations/localization.js +2 -0
- package/document-management/models/document-category.model.d.ts +4 -0
- package/document-management/models/document-category.model.js +18 -0
- package/document-management/models/document-collection-document.model.d.ts +7 -0
- package/document-management/models/document-collection-document.model.js +33 -0
- package/document-management/models/document-collection.model.d.ts +3 -0
- package/document-management/models/document-collection.model.js +14 -0
- package/document-management/models/document-file.model.d.ts +7 -0
- package/document-management/models/document-file.model.js +33 -0
- package/document-management/models/document-property-value.model.d.ts +21 -0
- package/document-management/models/document-property-value.model.js +58 -0
- package/document-management/models/document-property.model.d.ts +11 -0
- package/document-management/models/document-property.model.js +30 -0
- package/document-management/models/document-request-collection.model.d.ts +6 -0
- package/document-management/models/document-request-collection.model.js +28 -0
- package/document-management/models/document-request-file.model.d.ts +11 -0
- package/document-management/models/document-request-file.model.js +56 -0
- package/document-management/models/document-request-template.d.ts +10 -0
- package/document-management/models/document-request-template.js +39 -0
- package/document-management/models/document-request.model.d.ts +9 -0
- package/document-management/models/document-request.model.js +37 -0
- package/document-management/models/document-requests-template.d.ts +5 -0
- package/document-management/models/document-requests-template.js +23 -0
- package/document-management/models/document-type-property.model.d.ts +6 -0
- package/document-management/models/document-type-property.model.js +28 -0
- package/document-management/models/document-type.model.d.ts +7 -0
- package/document-management/models/document-type.model.js +32 -0
- package/document-management/models/document.model.d.ts +9 -0
- package/document-management/models/document.model.js +44 -0
- package/document-management/models/index.d.ts +15 -0
- package/document-management/models/index.js +15 -0
- package/document-management/models/schemas.d.ts +33 -0
- package/document-management/models/schemas.js +34 -0
- package/document-management/models/service-models/categories-and-types.view-model.d.ts +6 -0
- package/document-management/models/service-models/categories-and-types.view-model.js +24 -0
- package/document-management/models/service-models/document-folders.view-model.d.ts +22 -0
- package/document-management/models/service-models/document-folders.view-model.js +56 -0
- package/document-management/models/service-models/document-requests-template.view-model.d.ts +8 -0
- package/document-management/models/service-models/document-requests-template.view-model.js +26 -0
- package/document-management/models/service-models/document.service-model.d.ts +262 -0
- package/document-management/models/service-models/document.service-model.js +50 -0
- package/document-management/models/service-models/document.view-model.d.ts +33 -0
- package/document-management/models/service-models/document.view-model.js +99 -0
- package/document-management/models/service-models/index.d.ts +8 -0
- package/document-management/models/service-models/index.js +8 -0
- package/document-management/models/service-models/normalized-document-collection-view.model.d.ts +73 -0
- package/document-management/models/service-models/normalized-document-collection-view.model.js +110 -0
- package/document-management/models/service-models/normalized-requests-template-data.model.d.ts +16 -0
- package/document-management/models/service-models/normalized-requests-template-data.model.js +13 -0
- package/document-management/models/service-models/stats.view-model.d.ts +6 -0
- package/document-management/models/service-models/stats.view-model.js +32 -0
- package/document-management/module.d.ts +11 -0
- package/document-management/module.js +27 -0
- package/document-management/services/document-management.service.d.ts +65 -0
- package/document-management/services/document-management.service.js +376 -0
- package/document-management/services/index.d.ts +1 -0
- package/document-management/services/index.js +1 -0
- package/examples/document-management/main.d.ts +1 -0
- package/examples/document-management/main.js +30 -0
- package/examples/orm/drizzle.config.js +2 -1
- package/examples/orm/schemas.d.ts +1 -1
- package/examples/orm/user.model.d.ts +1 -2
- package/examples/orm/user.model.js +0 -1
- package/http/server/node/node-http-server.js +5 -5
- package/injector/injector.d.ts +4 -1
- package/injector/injector.js +4 -1
- package/injector/interfaces.d.ts +3 -3
- package/json-path/json-path.d.ts +2 -0
- package/json-path/json-path.js +7 -0
- package/message-bus/message-bus.d.ts +4 -6
- package/orm/database-schema.d.ts +3 -0
- package/orm/database-schema.js +6 -2
- package/orm/database.d.ts +6 -0
- package/orm/database.js +14 -0
- package/orm/decorators.d.ts +25 -2
- package/orm/decorators.js +15 -0
- package/orm/drizzle/index.d.ts +1 -0
- package/orm/drizzle/index.js +1 -0
- package/orm/drizzle/schema-converter.d.ts +37 -8
- package/orm/drizzle/schema-converter.js +121 -40
- package/orm/entity.d.ts +15 -12
- package/orm/entity.js +24 -11
- package/orm/index.d.ts +3 -2
- package/orm/index.js +3 -2
- package/orm/module.d.ts +6 -0
- package/orm/module.js +15 -0
- package/orm/query-converter.d.ts +5 -0
- package/orm/query-converter.js +114 -0
- package/orm/query.d.ts +15 -13
- package/orm/repository.d.ts +90 -31
- package/orm/repository.js +357 -55
- package/orm/schemas/index.d.ts +3 -0
- package/orm/schemas/index.js +3 -0
- package/orm/schemas/json.d.ts +9 -0
- package/orm/schemas/json.js +19 -0
- package/orm/schemas/numeric-date.d.ts +8 -0
- package/orm/schemas/numeric-date.js +13 -0
- package/orm/schemas/timestamp.d.ts +10 -0
- package/orm/schemas/timestamp.js +20 -0
- package/orm/transaction.d.ts +29 -0
- package/orm/transaction.js +73 -0
- package/orm/types.d.ts +15 -8
- package/orm/types.js +3 -2
- package/package.json +23 -12
- package/{rxjs → rxjs-utils}/reject-error.d.ts +1 -1
- package/{rxjs → rxjs-utils}/retry-backoff.d.ts +2 -2
- package/{rxjs → rxjs-utils}/slow-array.d.ts +7 -7
- package/{rxjs → rxjs-utils}/slow-array.js +2 -2
- package/{rxjs → rxjs-utils}/start-with-provider.d.ts +1 -1
- package/{rxjs → rxjs-utils}/teardown.d.ts +1 -1
- package/{rxjs → rxjs-utils}/untrack.d.ts +1 -1
- package/schema/decorators/types.d.ts +2 -2
- package/schema/schemas/number.d.ts +1 -1
- package/signals/pipe.d.ts +1 -1
- package/signals/pipe.js +1 -2
- package/sse/server-sent-events.d.ts +54 -0
- package/sse/server-sent-events.js +54 -0
- package/types.d.ts +5 -1
- package/utils/comparison.d.ts +2 -1
- package/utils/comparison.js +4 -3
- package/utils/compression.d.ts +4 -4
- package/utils/compression.js +35 -43
- package/utils/object/dereference.d.ts +6 -4
- package/utils/object/dereference.js +20 -8
- package/utils/object/object.d.ts +2 -0
- package/utils/object/object.js +20 -0
- /package/{rxjs → rxjs-utils}/cast.d.ts +0 -0
- /package/{rxjs → rxjs-utils}/cast.js +0 -0
- /package/{rxjs → rxjs-utils}/index.d.ts +0 -0
- /package/{rxjs → rxjs-utils}/index.js +0 -0
- /package/{rxjs → rxjs-utils}/noop.d.ts +0 -0
- /package/{rxjs → rxjs-utils}/noop.js +0 -0
- /package/{rxjs → rxjs-utils}/reject-error.js +0 -0
- /package/{rxjs → rxjs-utils}/retry-backoff.js +0 -0
- /package/{rxjs → rxjs-utils}/start-with-provider.js +0 -0
- /package/{rxjs → rxjs-utils}/teardown.js +0 -0
- /package/{rxjs → rxjs-utils}/timing.d.ts +0 -0
- /package/{rxjs → rxjs-utils}/timing.js +0 -0
- /package/{rxjs → rxjs-utils}/untrack.js +0 -0
package/utils/compression.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { NotSupportedError } from '../errors/not-supported.error.js';
|
|
2
1
|
import { dynamicImport } from '../import.js';
|
|
3
|
-
import { supportsReadableStream } from '../supports.js';
|
|
4
|
-
import { isAsyncIterable } from './async-iterable-helpers/is-async-iterable.js';
|
|
5
2
|
import { encodeBase64, encodeBase64Url } from './base64.js';
|
|
6
3
|
import { decodeText, encodeHex, encodeUtf8 } from './encoding.js';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { readableStreamFromPromise } from './stream/readable-stream-from-promise.js';
|
|
5
|
+
import { assertDefined, isNotNullOrUndefined } from './type-guards.js';
|
|
9
6
|
import { zBase32Encode } from './z-base32.js';
|
|
10
7
|
export function compressString(input, algorithm, options) {
|
|
11
8
|
const inputBuffer = encodeUtf8(input);
|
|
@@ -21,19 +18,19 @@ export function compress(buffer, algorithm, options) {
|
|
|
21
18
|
toZBase32: async () => zBase32Encode(await compressedBuffer)
|
|
22
19
|
};
|
|
23
20
|
}
|
|
21
|
+
const compressFunction = {
|
|
22
|
+
'gzip': 'gzip',
|
|
23
|
+
'brotli': 'brotliCompress',
|
|
24
|
+
'deflate': 'deflate',
|
|
25
|
+
'deflate-raw': 'deflateRaw'
|
|
26
|
+
};
|
|
24
27
|
async function _compress(buffer, algorithm, options) {
|
|
25
28
|
const zlib = await dynamicImport('zlib');
|
|
29
|
+
const compressor = zlib[compressFunction[algorithm]];
|
|
30
|
+
assertDefined(compressor, `Unsupported algorithm ${algorithm}`);
|
|
26
31
|
return new Promise((resolve, reject) => {
|
|
27
|
-
const compressor = algorithm == 'gzip' ? zlib.gzip
|
|
28
|
-
: algorithm == 'brotli' ? zlib.brotliDecompress
|
|
29
|
-
: algorithm == 'deflate' ? zlib.deflate
|
|
30
|
-
: algorithm == 'deflate-raw' ? zlib.deflateRaw // eslint-disable-line @typescript-eslint/no-unnecessary-condition
|
|
31
|
-
: undefined;
|
|
32
|
-
if (compressor == undefined) {
|
|
33
|
-
throw new Error(`unsupported algorithm ${algorithm}`);
|
|
34
|
-
}
|
|
35
32
|
const callback = (error, result) => {
|
|
36
|
-
if (error
|
|
33
|
+
if (isNotNullOrUndefined(error)) {
|
|
37
34
|
reject(error);
|
|
38
35
|
}
|
|
39
36
|
else {
|
|
@@ -64,22 +61,22 @@ export function decompress(buffer, algorithm, options) {
|
|
|
64
61
|
};
|
|
65
62
|
}
|
|
66
63
|
export function decompressStream(stream, algorithm, options) {
|
|
67
|
-
const
|
|
68
|
-
return
|
|
64
|
+
const streamPromise = _decompressStream(stream, algorithm, options);
|
|
65
|
+
return readableStreamFromPromise(streamPromise);
|
|
69
66
|
}
|
|
67
|
+
const decompressFunction = {
|
|
68
|
+
'gzip': 'gunzip',
|
|
69
|
+
'brotli': 'brotliDecompress',
|
|
70
|
+
'deflate': 'inflate',
|
|
71
|
+
'deflate-raw': 'inflateRaw'
|
|
72
|
+
};
|
|
70
73
|
async function _decompress(buffer, algorithm, options) {
|
|
71
74
|
const zlib = await dynamicImport('zlib');
|
|
75
|
+
const decompressor = zlib[decompressFunction[algorithm]];
|
|
76
|
+
assertDefined(decompressor, `Unsupported algorithm ${algorithm}`);
|
|
72
77
|
return new Promise((resolve, reject) => {
|
|
73
|
-
const decompressor = algorithm == 'gzip' ? zlib.gunzip
|
|
74
|
-
: algorithm == 'brotli' ? zlib.brotliDecompress
|
|
75
|
-
: algorithm == 'deflate' ? zlib.inflate
|
|
76
|
-
: algorithm == 'deflate-raw' ? zlib.inflateRaw // eslint-disable-line @typescript-eslint/no-unnecessary-condition
|
|
77
|
-
: undefined;
|
|
78
|
-
if (decompressor == undefined) {
|
|
79
|
-
throw new Error(`unsupported algorithm ${algorithm}`);
|
|
80
|
-
}
|
|
81
78
|
const callback = (error, result) => {
|
|
82
|
-
if (error
|
|
79
|
+
if (isNotNullOrUndefined(error)) {
|
|
83
80
|
reject(error);
|
|
84
81
|
}
|
|
85
82
|
else {
|
|
@@ -94,25 +91,20 @@ async function _decompress(buffer, algorithm, options) {
|
|
|
94
91
|
}
|
|
95
92
|
});
|
|
96
93
|
}
|
|
97
|
-
|
|
94
|
+
const decompressStreamFunction = {
|
|
95
|
+
'gzip': 'createGunzip',
|
|
96
|
+
'brotli': 'createBrotliDecompress',
|
|
97
|
+
'deflate': 'createInflate',
|
|
98
|
+
'deflate-raw': 'createInflateRaw'
|
|
99
|
+
};
|
|
100
|
+
async function _decompressStream(stream, algorithm, options) {
|
|
98
101
|
const zlib = await dynamicImport('zlib');
|
|
99
102
|
const nodeStream = await dynamicImport('stream');
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (decompressor == undefined) {
|
|
106
|
-
throw new Error(`unsupported algorithm ${algorithm}`);
|
|
107
|
-
}
|
|
108
|
-
if (stream instanceof nodeStream.Stream) {
|
|
109
|
-
yield* stream.pipe(decompressor);
|
|
110
|
-
}
|
|
111
|
-
if (isAsyncIterable(stream)) {
|
|
112
|
-
yield* nodeStream.Readable.from(stream).pipe(decompressor);
|
|
113
|
-
}
|
|
114
|
-
if (supportsReadableStream && (stream instanceof ReadableStream)) {
|
|
115
|
-
yield* nodeStream.Readable.fromWeb(stream).pipe(decompressor);
|
|
103
|
+
const nodeDecompressor = zlib[decompressStreamFunction[algorithm]](options);
|
|
104
|
+
assertDefined(nodeDecompressor, `Unsupported algorithm ${algorithm}`);
|
|
105
|
+
const decompressor = nodeStream.Transform.toWeb(nodeDecompressor);
|
|
106
|
+
if (stream instanceof nodeStream.Readable) {
|
|
107
|
+
return nodeStream.Readable.toWeb(stream).pipeThrough(decompressor);
|
|
116
108
|
}
|
|
117
|
-
|
|
109
|
+
return stream.pipeThrough(decompressor);
|
|
118
110
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { type JsonPathInput } from '../../json-path/index.js';
|
|
2
|
-
export type
|
|
2
|
+
export type DereferenceOptions = {
|
|
3
|
+
optional?: boolean;
|
|
4
|
+
};
|
|
3
5
|
/**
|
|
4
6
|
* Compiles a dereferencer for a specific reference
|
|
5
7
|
* @param object object to dereference
|
|
6
8
|
* @param reference path to property in dot notation or {@link JsonPath}
|
|
7
9
|
* @returns referenced value
|
|
8
10
|
*/
|
|
9
|
-
export declare function compileDereferencer(reference: JsonPathInput): (object: object) => unknown;
|
|
11
|
+
export declare function compileDereferencer(reference: JsonPathInput, options?: DereferenceOptions): (object: object) => unknown;
|
|
10
12
|
/**
|
|
11
13
|
* Dereference a reference
|
|
12
14
|
*
|
|
@@ -17,7 +19,7 @@ export declare function compileDereferencer(reference: JsonPathInput): (object:
|
|
|
17
19
|
* @param reference path to property in dot notation or {@link JsonPath}
|
|
18
20
|
* @returns referenced value
|
|
19
21
|
*/
|
|
20
|
-
export declare function dereference(object: object, reference: JsonPathInput): unknown;
|
|
22
|
+
export declare function dereference(object: object, reference: JsonPathInput, options?: DereferenceOptions): unknown;
|
|
21
23
|
/**
|
|
22
24
|
* Cached version of {@link dereference}. It caches the internally used dereferencer, but it does *not* cache the referenced value
|
|
23
25
|
*
|
|
@@ -29,4 +31,4 @@ export declare function dereference(object: object, reference: JsonPathInput): u
|
|
|
29
31
|
* @param reference path to property in dot notation or {@link JsonPath}
|
|
30
32
|
* @returns referenced value
|
|
31
33
|
*/
|
|
32
|
-
export declare function getCachedDereference(): typeof dereference;
|
|
34
|
+
export declare function getCachedDereference(options?: DereferenceOptions): typeof dereference;
|
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
import { JsonPath } from '../../json-path/index.js';
|
|
2
2
|
import { memoizeSingle } from '../function/memoize.js';
|
|
3
|
+
import { isNullOrUndefined } from '../type-guards.js';
|
|
3
4
|
/**
|
|
4
5
|
* Compiles a dereferencer for a specific reference
|
|
5
6
|
* @param object object to dereference
|
|
6
7
|
* @param reference path to property in dot notation or {@link JsonPath}
|
|
7
8
|
* @returns referenced value
|
|
8
9
|
*/
|
|
9
|
-
export function compileDereferencer(reference) {
|
|
10
|
+
export function compileDereferencer(reference, options) {
|
|
10
11
|
const nodes = JsonPath.from(reference).nodes;
|
|
11
|
-
|
|
12
|
+
if (options?.optional == true) {
|
|
13
|
+
return function optionalDereferencer(object) {
|
|
14
|
+
let target = object;
|
|
15
|
+
for (let i = 0; i < nodes.length; i++) { // eslint-disable-line @typescript-eslint/prefer-for-of
|
|
16
|
+
if (isNullOrUndefined(target)) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
target = target[nodes[i]];
|
|
20
|
+
}
|
|
21
|
+
return target;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return function dereferencer(object) {
|
|
12
25
|
let target = object;
|
|
13
26
|
for (let i = 0; i < nodes.length; i++) { // eslint-disable-line @typescript-eslint/prefer-for-of
|
|
14
27
|
target = target[nodes[i]];
|
|
15
28
|
}
|
|
16
29
|
return target;
|
|
17
|
-
}
|
|
18
|
-
return dereferencer;
|
|
30
|
+
};
|
|
19
31
|
}
|
|
20
32
|
/**
|
|
21
33
|
* Dereference a reference
|
|
@@ -27,8 +39,8 @@ export function compileDereferencer(reference) {
|
|
|
27
39
|
* @param reference path to property in dot notation or {@link JsonPath}
|
|
28
40
|
* @returns referenced value
|
|
29
41
|
*/
|
|
30
|
-
export function dereference(object, reference) {
|
|
31
|
-
return compileDereferencer(reference)(object);
|
|
42
|
+
export function dereference(object, reference, options) {
|
|
43
|
+
return compileDereferencer(reference, options)(object);
|
|
32
44
|
}
|
|
33
45
|
/**
|
|
34
46
|
* Cached version of {@link dereference}. It caches the internally used dereferencer, but it does *not* cache the referenced value
|
|
@@ -41,10 +53,10 @@ export function dereference(object, reference) {
|
|
|
41
53
|
* @param reference path to property in dot notation or {@link JsonPath}
|
|
42
54
|
* @returns referenced value
|
|
43
55
|
*/
|
|
44
|
-
export function getCachedDereference() {
|
|
56
|
+
export function getCachedDereference(options) {
|
|
45
57
|
const memoizedDereferencer = memoizeSingle(compileDereferencer);
|
|
46
58
|
function cachedDereference(object, reference) {
|
|
47
|
-
return memoizedDereferencer(reference)(object);
|
|
59
|
+
return memoizedDereferencer(reference, options)(object);
|
|
48
60
|
}
|
|
49
61
|
return cachedDereference;
|
|
50
62
|
}
|
package/utils/object/object.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type JsonPathInput } from '../../json-path/json-path.js';
|
|
1
2
|
import type { BaseType, FromEntries, ObjectLiteral, Optionalize, PickBy, Record, SimplifyObject } from '../../types.js';
|
|
2
3
|
export declare function hasOwnProperty<T extends Record>(obj: T, key: keyof T): boolean;
|
|
3
4
|
/**
|
|
@@ -23,5 +24,6 @@ export declare function filterUndefinedObjectProperties<T extends ObjectLiteral>
|
|
|
23
24
|
export declare function copyObjectProperties<T extends ObjectLiteral, U extends T>(source: T, target: U): void;
|
|
24
25
|
export declare function getGetter<T extends ObjectLiteral, U extends keyof T>(obj: T, property: keyof T, bind: boolean): () => T[U];
|
|
25
26
|
export declare function deepObjectEntries(object: ObjectLiteral, keepInnerObjects?: boolean, prefix?: string): [string, any][];
|
|
27
|
+
export declare function fromDeepObjectEntries(entries: readonly (readonly [JsonPathInput, any])[]): ObjectLiteral;
|
|
26
28
|
export declare function omit<T extends Record, K extends keyof T>(object: T, ...keys: K[]): SimplifyObject<Omit<T, K>>;
|
|
27
29
|
export declare function pick<T extends Record, K extends keyof T>(object: T, ...keys: K[]): SimplifyObject<Pick<T, K>>;
|
package/utils/object/object.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JsonPath } from '../../json-path/json-path.js';
|
|
1
2
|
import { filterAsync } from '../async-iterable-helpers/filter.js';
|
|
2
3
|
import { mapAsync } from '../async-iterable-helpers/map.js';
|
|
3
4
|
import { toArrayAsync } from '../async-iterable-helpers/to-array.js';
|
|
@@ -103,6 +104,25 @@ export function deepObjectEntries(object, keepInnerObjects = false, prefix) {
|
|
|
103
104
|
}
|
|
104
105
|
return entries;
|
|
105
106
|
}
|
|
107
|
+
export function fromDeepObjectEntries(entries) {
|
|
108
|
+
const obj = {};
|
|
109
|
+
for (const [path, value] of entries) {
|
|
110
|
+
const jsonPath = JsonPath.from(path);
|
|
111
|
+
let target = obj;
|
|
112
|
+
for (let i = 0; i < jsonPath.nodes.length - 1; i++) {
|
|
113
|
+
if (hasOwnProperty(target, jsonPath.nodes[i])) {
|
|
114
|
+
target = obj[jsonPath.nodes[i]];
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
const child = {};
|
|
118
|
+
target[jsonPath.nodes[i]] = child;
|
|
119
|
+
target = child;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
target[jsonPath.nodes.at(-1)] = value;
|
|
123
|
+
}
|
|
124
|
+
return obj;
|
|
125
|
+
}
|
|
106
126
|
export function omit(object, ...keys) {
|
|
107
127
|
return filterObject(object, (_, key) => !keys.includes(key));
|
|
108
128
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|