clientnode 4.0.1427 → 4.0.1429
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/Lock.js +100 -1
- package/dist/Logger.js +185 -1
- package/dist/Semaphore.js +65 -1
- package/dist/array.js +452 -1
- package/dist/cli.js +51 -1
- package/dist/constants.js +126 -1
- package/dist/context.js +40 -1
- package/dist/cookie.js +84 -1
- package/dist/data-transfer.js +216 -1
- package/dist/datetime.js +282 -1
- package/dist/domNode.js +331 -1
- package/dist/expression/evaluators.js +273 -1
- package/dist/expression/helper.js +97 -1
- package/dist/expression/index.js +26 -1
- package/dist/expression/indicator-functions.js +37 -1
- package/dist/expression/type.js +20 -0
- package/dist/filesystem.js +410 -1
- package/dist/function.js +75 -1
- package/dist/index.js +43 -1
- package/dist/indicators.js +121 -1
- package/dist/number.js +61 -1
- package/dist/object.js +934 -1
- package/dist/process.js +69 -1
- package/dist/property-types.js +115 -1
- package/dist/require.js +82 -1
- package/dist/scope.js +85 -1
- package/dist/string.js +806 -1
- package/dist/test-helper.js +341 -1
- package/dist/type.js +21 -1
- package/dist/utility.js +139 -1
- package/package.json +23 -21
- package/dist/Lock.d.ts +0 -39
- package/dist/Logger.d.ts +0 -102
- package/dist/Semaphore.d.ts +0 -29
- package/dist/array.d.ts +0 -150
- package/dist/bundle/Lock.js +0 -1
- package/dist/bundle/Logger.js +0 -1
- package/dist/bundle/Semaphore.js +0 -1
- package/dist/bundle/array.js +0 -1
- package/dist/bundle/cli.js +0 -1
- package/dist/bundle/constants.js +0 -1
- package/dist/bundle/context.js +0 -1
- package/dist/bundle/cookie.js +0 -1
- package/dist/bundle/data-transfer.js +0 -1
- package/dist/bundle/datetime.js +0 -1
- package/dist/bundle/domNode.js +0 -1
- package/dist/bundle/expression/evaluators.js +0 -1
- package/dist/bundle/expression/helper.js +0 -1
- package/dist/bundle/expression/index.js +0 -1
- package/dist/bundle/expression/indicator-functions.js +0 -1
- package/dist/bundle/expression/types.js +0 -1
- package/dist/bundle/filesystem.js +0 -1
- package/dist/bundle/function.js +0 -1
- package/dist/bundle/index.js +0 -1
- package/dist/bundle/indicators.js +0 -1
- package/dist/bundle/number.js +0 -1
- package/dist/bundle/object.js +0 -1
- package/dist/bundle/process.js +0 -1
- package/dist/bundle/property-types.js +0 -1
- package/dist/bundle/require.js +0 -1
- package/dist/bundle/scope.js +0 -1
- package/dist/bundle/string.js +0 -1
- package/dist/bundle/test-helper.js +0 -1
- package/dist/bundle/type.js +0 -1
- package/dist/bundle/utility.js +0 -1
- package/dist/cli.d.ts +0 -31
- package/dist/compatible/Lock.js +0 -1
- package/dist/compatible/Logger.js +0 -1
- package/dist/compatible/Semaphore.js +0 -1
- package/dist/compatible/array.js +0 -1
- package/dist/compatible/cli.js +0 -1
- package/dist/compatible/constants.js +0 -1
- package/dist/compatible/context.js +0 -1
- package/dist/compatible/cookie.js +0 -1
- package/dist/compatible/data-transfer.js +0 -1
- package/dist/compatible/datetime.js +0 -1
- package/dist/compatible/domNode.js +0 -1
- package/dist/compatible/expression/evaluators.js +0 -1
- package/dist/compatible/expression/helper.js +0 -1
- package/dist/compatible/expression/index.js +0 -1
- package/dist/compatible/expression/indicator-functions.js +0 -1
- package/dist/compatible/expression/types.js +0 -1
- package/dist/compatible/filesystem.js +0 -1
- package/dist/compatible/function.js +0 -1
- package/dist/compatible/index.js +0 -1
- package/dist/compatible/indicators.js +0 -1
- package/dist/compatible/number.js +0 -1
- package/dist/compatible/object.js +0 -1
- package/dist/compatible/process.js +0 -1
- package/dist/compatible/property-types.js +0 -1
- package/dist/compatible/require.js +0 -1
- package/dist/compatible/scope.js +0 -1
- package/dist/compatible/string.js +0 -1
- package/dist/compatible/test-helper.js +0 -1
- package/dist/compatible/type.js +0 -1
- package/dist/compatible/utility.js +0 -1
- package/dist/constants.d.ts +0 -99
- package/dist/context.d.ts +0 -9
- package/dist/cookie.d.ts +0 -31
- package/dist/data-transfer.d.ts +0 -45
- package/dist/datetime.d.ts +0 -37
- package/dist/domNode.d.ts +0 -82
- package/dist/expression/evaluators.d.ts +0 -55
- package/dist/expression/helper.d.ts +0 -4
- package/dist/expression/index.d.ts +0 -7
- package/dist/expression/indicator-functions.d.ts +0 -14
- package/dist/expression/types.d.ts +0 -70
- package/dist/expression/types.js +0 -1
- package/dist/filesystem.d.ts +0 -138
- package/dist/function.d.ts +0 -20
- package/dist/index.d.ts +0 -23
- package/dist/indicators.d.ts +0 -68
- package/dist/number.d.ts +0 -35
- package/dist/object.d.ts +0 -213
- package/dist/process.d.ts +0 -22
- package/dist/property-types.d.ts +0 -460
- package/dist/require.d.ts +0 -6
- package/dist/scope.d.ts +0 -44
- package/dist/string.d.ts +0 -299
- package/dist/test/Lock.d.ts +0 -1
- package/dist/test/Logger.d.ts +0 -1
- package/dist/test/Semaphore.d.ts +0 -1
- package/dist/test/array.d.ts +0 -1
- package/dist/test/cookie.d.ts +0 -1
- package/dist/test/data-transfer.d.ts +0 -1
- package/dist/test/datetime.d.ts +0 -1
- package/dist/test/domNode.d.ts +0 -1
- package/dist/test/expression/evaluators.d.ts +0 -1
- package/dist/test/expression/helper.d.ts +0 -1
- package/dist/test/expression/indicator-functions.d.ts +0 -1
- package/dist/test/filesystem.d.ts +0 -1
- package/dist/test/function.d.ts +0 -1
- package/dist/test/indicators.d.ts +0 -1
- package/dist/test/number.d.ts +0 -1
- package/dist/test/object.d.ts +0 -1
- package/dist/test/process.d.ts +0 -1
- package/dist/test/property-types.d.ts +0 -1
- package/dist/test/scope.d.ts +0 -1
- package/dist/test/string.d.ts +0 -1
- package/dist/test/utility.d.ts +0 -1
- package/dist/test-helper.d.ts +0 -143
- package/dist/type.d.ts +0 -211
- package/dist/utility.d.ts +0 -44
package/dist/filesystem.d.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { AnyFunction, Encoding, File, FileTraverseResult } from './type';
|
|
2
|
-
import { ObjectEncodingOptions } from 'node:fs';
|
|
3
|
-
export declare const mkdirSync: typeof import("node:fs").mkdirSync | null, readdirSync: typeof import("node:fs").readdirSync | null, readFileSync: typeof import("node:fs").readFileSync | null, statSync: typeof import("node:fs").statSync | null, writeFileSync: typeof import("node:fs").writeFileSync | null;
|
|
4
|
-
/**
|
|
5
|
-
* Copies given source directory via path to given target directory location
|
|
6
|
-
* with same target name as source file has or copy to given complete target
|
|
7
|
-
* directory path.
|
|
8
|
-
* @param sourcePath - Path to directory to copy.
|
|
9
|
-
* @param targetPath - Target directory or complete directory location to copy
|
|
10
|
-
* in.
|
|
11
|
-
* @param contents - Indicates whether we only want to copy content of source
|
|
12
|
-
* path without recreating the sourcefile itself on target location.
|
|
13
|
-
* @param callback - Function to invoke for each traversed file.
|
|
14
|
-
* @param readOptions - Options to use for reading source file.
|
|
15
|
-
* @param writeOptions - Options to use for writing to target file.
|
|
16
|
-
* @returns Promise holding the determined target directory path.
|
|
17
|
-
*/
|
|
18
|
-
export declare const copyDirectoryRecursive: (sourcePath: string, targetPath: string, contents?: boolean, callback?: AnyFunction, readOptions?: {
|
|
19
|
-
encoding: null;
|
|
20
|
-
flag: string;
|
|
21
|
-
}, writeOptions?: {
|
|
22
|
-
encoding: Encoding;
|
|
23
|
-
flag: string;
|
|
24
|
-
mode: number;
|
|
25
|
-
}) => Promise<string>;
|
|
26
|
-
/**
|
|
27
|
-
* Copies given source directory via path to given target directory location
|
|
28
|
-
* with same target name as source file has or copy to given complete target
|
|
29
|
-
* directory path.
|
|
30
|
-
* @param sourcePath - Path to directory to copy.
|
|
31
|
-
* @param targetPath - Target directory or complete directory location to copy
|
|
32
|
-
* in.
|
|
33
|
-
* @param contents - Indicates whether we only want to copy content of source
|
|
34
|
-
* path without recreating the sourcefile itself on target location.
|
|
35
|
-
* @param callback - Function to invoke for each traversed file.
|
|
36
|
-
* @param readOptions - Options to use for reading source file.
|
|
37
|
-
* @param writeOptions - Options to use for writing to target file.
|
|
38
|
-
* @returns Determined target directory path.
|
|
39
|
-
*/
|
|
40
|
-
export declare const copyDirectoryRecursiveSync: (sourcePath: string, targetPath: string, contents?: boolean, callback?: AnyFunction, readOptions?: {
|
|
41
|
-
encoding: null;
|
|
42
|
-
flag: string;
|
|
43
|
-
}, writeOptions?: {
|
|
44
|
-
encoding: Encoding;
|
|
45
|
-
flag: string;
|
|
46
|
-
mode: number;
|
|
47
|
-
}) => string;
|
|
48
|
-
/**
|
|
49
|
-
* Copies given source file via path to given target directory location with
|
|
50
|
-
* same target name as source file has or copy to given complete target file
|
|
51
|
-
* path.
|
|
52
|
-
* @param sourcePath - Path to file to copy.
|
|
53
|
-
* @param targetPath - Target directory or complete file location to copy to.
|
|
54
|
-
* @param readOptions - Options to use for reading source file.
|
|
55
|
-
* @param writeOptions - Options to use for writing to target file.
|
|
56
|
-
* @returns Determined target file path.
|
|
57
|
-
*/
|
|
58
|
-
export declare const copyFile: (sourcePath: string, targetPath: string, readOptions?: {
|
|
59
|
-
encoding: null;
|
|
60
|
-
flag: string;
|
|
61
|
-
}, writeOptions?: {
|
|
62
|
-
encoding: Encoding;
|
|
63
|
-
flag: string;
|
|
64
|
-
mode: number;
|
|
65
|
-
}) => Promise<string>;
|
|
66
|
-
/**
|
|
67
|
-
* Copies given source file via path to given target directory location with
|
|
68
|
-
* same target name as source file has or copy to given complete target file
|
|
69
|
-
* path.
|
|
70
|
-
* @param sourcePath - Path to file to copy.
|
|
71
|
-
* @param targetPath - Target directory or complete file location to copy to.
|
|
72
|
-
* @param readOptions - Options to use for reading source file.
|
|
73
|
-
* @param writeOptions - Options to use for writing to target file.
|
|
74
|
-
* @returns Determined target file path.
|
|
75
|
-
*/
|
|
76
|
-
export declare const copyFileSync: (sourcePath: string, targetPath: string, readOptions?: {
|
|
77
|
-
encoding: null;
|
|
78
|
-
flag: string;
|
|
79
|
-
}, writeOptions?: {
|
|
80
|
-
encoding: Encoding;
|
|
81
|
-
flag: string;
|
|
82
|
-
mode: number;
|
|
83
|
-
}) => string;
|
|
84
|
-
/**
|
|
85
|
-
* Checks if given path points to a valid directory.
|
|
86
|
-
* @param filePath - Path to directory.
|
|
87
|
-
* @returns A promise holding a boolean which indicates directory existence.
|
|
88
|
-
*/
|
|
89
|
-
export declare const isDirectory: (filePath: string) => Promise<boolean>;
|
|
90
|
-
/**
|
|
91
|
-
* Checks if given path points to a valid directory.
|
|
92
|
-
* @param filePath - Path to directory.
|
|
93
|
-
* @returns A boolean which indicates directory existence.
|
|
94
|
-
*/
|
|
95
|
-
export declare const isDirectorySync: (filePath: string) => boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Checks if given path points to a valid file.
|
|
98
|
-
* @param filePath - Path to directory.
|
|
99
|
-
* @returns A promise holding a boolean which indicates directory existence.
|
|
100
|
-
*/
|
|
101
|
-
export declare const isFile: (filePath: string) => Promise<boolean>;
|
|
102
|
-
/**
|
|
103
|
-
* Checks if given path points to a valid file.
|
|
104
|
-
* @param filePath - Path to file.
|
|
105
|
-
* @returns A boolean which indicates file existence.
|
|
106
|
-
*/
|
|
107
|
-
export declare const isFileSync: (filePath: string) => boolean;
|
|
108
|
-
/**
|
|
109
|
-
* Iterates through given directory structure recursively and calls given
|
|
110
|
-
* callback for each found file. Callback gets file path and corresponding stat
|
|
111
|
-
* object as argument.
|
|
112
|
-
* @param directoryPath - Path to directory structure to traverse.
|
|
113
|
-
* @param callback - Function to invoke for each traversed file and potentially
|
|
114
|
-
* manipulate further traversing in alphabetical sorted order.
|
|
115
|
-
* If it returns "null" or a promise resolving to "null", no further files
|
|
116
|
-
* will be traversed afterward.
|
|
117
|
-
* If it handles a directory and returns "false" or a promise resolving to
|
|
118
|
-
* "false" no traversing into that directory will occur.
|
|
119
|
-
* @param options - Options to use for nested "readdir" calls.
|
|
120
|
-
* @returns A promise holding the determined files.
|
|
121
|
-
*/
|
|
122
|
-
export declare const walkDirectoryRecursively: (directoryPath: string, callback?: null | ((file: File) => FileTraverseResult), options?: (Encoding | (ObjectEncodingOptions & {
|
|
123
|
-
withFileTypes?: false;
|
|
124
|
-
recursive?: boolean;
|
|
125
|
-
}))) => Promise<Array<File>>;
|
|
126
|
-
/**
|
|
127
|
-
* Iterates through given directory structure recursively and calls given
|
|
128
|
-
* callback for each found file. Callback gets file path and corresponding
|
|
129
|
-
* stats object as argument.
|
|
130
|
-
* @param directoryPath - Path to directory structure to traverse.
|
|
131
|
-
* @param callback - Function to invoke for each traversed file.
|
|
132
|
-
* @param options - Options to use for nested "readdir" calls.
|
|
133
|
-
* @returns Determined list if all files.
|
|
134
|
-
*/
|
|
135
|
-
export declare const walkDirectoryRecursivelySync: (directoryPath: string, callback?: AnyFunction | null, options?: (Encoding | (ObjectEncodingOptions & {
|
|
136
|
-
withFileTypes?: false;
|
|
137
|
-
recursive?: boolean;
|
|
138
|
-
}))) => Array<File>;
|
package/dist/function.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { AnyFunction } from './type';
|
|
2
|
-
/**
|
|
3
|
-
* Determines all parameter names from given callable (function or class,
|
|
4
|
-
* ...).
|
|
5
|
-
* @param callable - Function or function code to inspect.
|
|
6
|
-
* @returns List of parameter names.
|
|
7
|
-
*/
|
|
8
|
-
export declare const getParameterNames: (callable: AnyFunction | string) => Array<string>;
|
|
9
|
-
/**
|
|
10
|
-
* Implements the identity function.
|
|
11
|
-
* @param value - A value to return.
|
|
12
|
-
* @returns Returns the given value.
|
|
13
|
-
*/
|
|
14
|
-
export declare const identity: <T>(value: T) => T;
|
|
15
|
-
/**
|
|
16
|
-
* Inverted filter helper to inverse each given filter.
|
|
17
|
-
* @param filter - A function that filters an array.
|
|
18
|
-
* @returns The inverted filter.
|
|
19
|
-
*/
|
|
20
|
-
export declare const invertArrayFilter: <T, D = Array<unknown>>(filter: T) => T;
|
package/dist/index.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export * from './array';
|
|
2
|
-
export * from './domNode';
|
|
3
|
-
export * from './cli';
|
|
4
|
-
export * from './constants';
|
|
5
|
-
export * from './context';
|
|
6
|
-
export * from './cookie';
|
|
7
|
-
export * from './data-transfer';
|
|
8
|
-
export * from './datetime';
|
|
9
|
-
export * from './expression';
|
|
10
|
-
export * from './filesystem';
|
|
11
|
-
export * from './function';
|
|
12
|
-
export * from './indicators';
|
|
13
|
-
export * from './Lock';
|
|
14
|
-
export * from './number';
|
|
15
|
-
export * from './object';
|
|
16
|
-
export * from './process';
|
|
17
|
-
export * from './require';
|
|
18
|
-
export * from './scope';
|
|
19
|
-
export * from './Semaphore';
|
|
20
|
-
export * from './string';
|
|
21
|
-
export * from './Logger';
|
|
22
|
-
export * from './type';
|
|
23
|
-
export * from './utility';
|
package/dist/indicators.d.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { AnyFunction, Mapping, PlainObject, ProxyType } from './type';
|
|
2
|
-
/**
|
|
3
|
-
* Determines whether its argument represents a JavaScript number.
|
|
4
|
-
* @param value - Value to analyze.
|
|
5
|
-
* @returns A boolean value indicating whether given object is numeric
|
|
6
|
-
* like.
|
|
7
|
-
*/
|
|
8
|
-
export declare const isNumeric: (value: unknown) => value is number;
|
|
9
|
-
/**
|
|
10
|
-
* Determine whether the argument is a window.
|
|
11
|
-
* @param value - Value to check for.
|
|
12
|
-
* @returns Boolean value indicating the result.
|
|
13
|
-
*/
|
|
14
|
-
export declare const isWindow: (value: unknown) => value is Window;
|
|
15
|
-
/**
|
|
16
|
-
* Checks if given object is similar to an array and can be handled like an
|
|
17
|
-
* array.
|
|
18
|
-
* @param object - Object to check behavior for.
|
|
19
|
-
* @returns A boolean value indicating whether given object is array like.
|
|
20
|
-
*/
|
|
21
|
-
export declare const isArrayLike: (object: unknown) => boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Checks whether one of the given pattern matches given string.
|
|
24
|
-
* @param target - Target to check in pattern for.
|
|
25
|
-
* @param pattern - List of pattern to check for.
|
|
26
|
-
* @returns Value "true" if given object is matches by at leas one of the
|
|
27
|
-
* given pattern and "false" otherwise.
|
|
28
|
-
*/
|
|
29
|
-
export declare const isAnyMatching: (target: string, pattern: Array<RegExp | string>) => boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Checks whether given object is a native object but not null.
|
|
32
|
-
* @param value - Value to check.
|
|
33
|
-
* @returns Value "true" if given object is a plain javaScript object and
|
|
34
|
-
* "false" otherwise.
|
|
35
|
-
*/
|
|
36
|
-
export declare const isObject: (value: unknown) => value is Mapping<unknown>;
|
|
37
|
-
/**
|
|
38
|
-
* Checks whether given object is a plain native object.
|
|
39
|
-
* @param value - Value to check.
|
|
40
|
-
* @returns Value "true" if given object is a plain javaScript object and
|
|
41
|
-
* "false" otherwise.
|
|
42
|
-
*/
|
|
43
|
-
export declare const isPlainObject: (value: unknown) => value is PlainObject;
|
|
44
|
-
/**
|
|
45
|
-
* Checks whether given object is a set.
|
|
46
|
-
* @param value - Value to check.
|
|
47
|
-
* @returns Value "true" if given object is a set and "false" otherwise.
|
|
48
|
-
*/
|
|
49
|
-
export declare const isSet: (value: unknown) => value is Set<unknown>;
|
|
50
|
-
/**
|
|
51
|
-
* Checks whether given object is a map.
|
|
52
|
-
* @param value - Value to check.
|
|
53
|
-
* @returns Value "true" if given object is a map and "false" otherwise.
|
|
54
|
-
*/
|
|
55
|
-
export declare const isMap: (value: unknown) => value is Map<unknown, unknown>;
|
|
56
|
-
/**
|
|
57
|
-
* Checks whether given object is a proxy.
|
|
58
|
-
* @param value - Value to check.
|
|
59
|
-
* @returns Value "true" if given object is a proxy and "false" otherwise.
|
|
60
|
-
*/
|
|
61
|
-
export declare const isProxy: (value: unknown) => value is ProxyType;
|
|
62
|
-
/**
|
|
63
|
-
* Checks whether given object is a function.
|
|
64
|
-
* @param value - Value to check.
|
|
65
|
-
* @returns Value "true" if given object is a function and "false"
|
|
66
|
-
* otherwise.
|
|
67
|
-
*/
|
|
68
|
-
export declare const isFunction: (value: unknown) => value is AnyFunction;
|
package/dist/number.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines corresponding utc timestamp for given date object.
|
|
3
|
-
* @param value - Date to convert.
|
|
4
|
-
* @param inMilliseconds - Indicates whether given number should be in
|
|
5
|
-
* seconds (default) or milliseconds.
|
|
6
|
-
* @returns Determined numerous value.
|
|
7
|
-
*/
|
|
8
|
-
export declare const getUTCTimestamp: (value?: Date | null | number | string, inMilliseconds?: boolean) => number;
|
|
9
|
-
/**
|
|
10
|
-
* Checks if given object is java scripts native "Number.NaN" object.
|
|
11
|
-
* @param value - Value to check.
|
|
12
|
-
* @returns Returns whether given value is not a number or not.
|
|
13
|
-
*/
|
|
14
|
-
export declare const isNotANumber: (value: unknown) => boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Rounds a given number accurate to given number of digits.
|
|
17
|
-
* @param number - The number to round.
|
|
18
|
-
* @param digits - The number of digits after comma.
|
|
19
|
-
* @returns Returns the rounded number.
|
|
20
|
-
*/
|
|
21
|
-
export declare const round: (number: number, digits?: number) => number;
|
|
22
|
-
/**
|
|
23
|
-
* Rounds a given number up accurate to given number of digits.
|
|
24
|
-
* @param number - The number to round.
|
|
25
|
-
* @param digits - The number of digits after comma.
|
|
26
|
-
* @returns Returns the rounded number.
|
|
27
|
-
*/
|
|
28
|
-
export declare const ceil: (number: number, digits?: number) => number;
|
|
29
|
-
/**
|
|
30
|
-
* Rounds a given number down accurate to given number of digits.
|
|
31
|
-
* @param number - The number to round.
|
|
32
|
-
* @param digits - The number of digits after comma.
|
|
33
|
-
* @returns Returns the rounded number.
|
|
34
|
-
*/
|
|
35
|
-
export declare const floor: (number: number, digits?: number) => number;
|
package/dist/object.d.ts
DELETED
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { IGNORE_NULL_AND_UNDEFINED_SYMBOL } from './constants';
|
|
2
|
-
import { CompareOptions, GetterFunction, Mapping, ObjectMaskConfiguration, PlainObject, ProxyHandler, ProxyType, RecursiveEvaluateable, RecursivePartial, SetterFunction } from './type';
|
|
3
|
-
/**
|
|
4
|
-
* Adds dynamic getter and setter to any given data structure such as maps.
|
|
5
|
-
* @param object - Object to proxy.
|
|
6
|
-
* @param getterWrapper - Function to wrap each property get.
|
|
7
|
-
* @param setterWrapper - Function to wrap each property set.
|
|
8
|
-
* @param methodNames - Method names to perform actions on the given
|
|
9
|
-
* object.
|
|
10
|
-
* @param deep - Indicates to perform a deep wrapping of specified types.
|
|
11
|
-
* @param typesToExtend - Types which should be extended (Checks are
|
|
12
|
-
* performed via "value instanceof type".).
|
|
13
|
-
* @returns Returns given object wrapped with a dynamic getter proxy.
|
|
14
|
-
*/
|
|
15
|
-
export declare const addDynamicGetterAndSetter: <T = unknown>(object: T, getterWrapper?: GetterFunction | null, setterWrapper?: null | SetterFunction, methodNames?: Mapping, deep?: boolean, typesToExtend?: Array<unknown>) => ProxyType<T> | T;
|
|
16
|
-
/**
|
|
17
|
-
* Converts given object into its serialized json representation by
|
|
18
|
-
* replacing circular references with a given provided value.
|
|
19
|
-
*
|
|
20
|
-
* This method traverses given object recursively and tracks of seen and
|
|
21
|
-
* already serialized structures to reuse generated strings or mark a
|
|
22
|
-
* circular reference.
|
|
23
|
-
* @param object - Object to serialize.
|
|
24
|
-
* @param determineCircularReferenceValue - Callback to create a fallback
|
|
25
|
-
* value depending on given redundant value.
|
|
26
|
-
* @param numberOfSpaces - Number of spaces to use for string formatting.
|
|
27
|
-
* @returns The formatted json string.
|
|
28
|
-
*/
|
|
29
|
-
export declare const convertCircularObjectToJSON: (object: unknown, determineCircularReferenceValue?: ((serializedValue: unknown, key: null | string, value: unknown, seenObjects: Map<unknown, unknown>) => unknown), numberOfSpaces?: number) => ReturnType<typeof JSON.stringify> | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Converts given map and all nested found maps objects to corresponding
|
|
32
|
-
* object.
|
|
33
|
-
* @param object - Map to convert to.
|
|
34
|
-
* @param deep - Indicates whether to perform a recursive conversion.
|
|
35
|
-
* @returns Given map as object.
|
|
36
|
-
*/
|
|
37
|
-
export declare const convertMapToPlainObject: (object: unknown, deep?: boolean) => unknown;
|
|
38
|
-
/**
|
|
39
|
-
* Converts given plain object and all nested found objects to
|
|
40
|
-
* corresponding map.
|
|
41
|
-
* @param object - Object to convert to.
|
|
42
|
-
* @param deep - Indicates whether to perform a recursive conversion.
|
|
43
|
-
* @returns Given object as map.
|
|
44
|
-
*/
|
|
45
|
-
export declare const convertPlainObjectToMap: (object: unknown, deep?: boolean) => unknown;
|
|
46
|
-
/**
|
|
47
|
-
* Replaces given pattern in each value in given object recursively with
|
|
48
|
-
* given string replacement.
|
|
49
|
-
* @param object - Object to convert substrings in.
|
|
50
|
-
* @param pattern - Regular expression to replace.
|
|
51
|
-
* @param replacement - String to use as replacement for found patterns.
|
|
52
|
-
* @returns Converted object with replaced patterns.
|
|
53
|
-
*/
|
|
54
|
-
export declare const convertSubstringInPlainObject: <Type extends Mapping<unknown> = PlainObject>(object: Type, pattern: RegExp | string, replacement: string) => Type;
|
|
55
|
-
/**
|
|
56
|
-
* Copies given object (of any type) into optionally given destination.
|
|
57
|
-
* @param source - Object to copy.
|
|
58
|
-
* @param copyBlobs - Determines whether to copy blobs as well.
|
|
59
|
-
* @param recursionLimit - Specifies how deep we should traverse into given
|
|
60
|
-
* object recursively.
|
|
61
|
-
* @param recursionEndValue - Indicates which value to use for recursion ends.
|
|
62
|
-
* Usually a reference to corresponding source value will be used.
|
|
63
|
-
* @param destination - Target to copy source to.
|
|
64
|
-
* @param cyclic - Indicates whether known sub structures should be copied or
|
|
65
|
-
* referenced (if "true" endless loops can occur if source has cyclic
|
|
66
|
-
* structures).
|
|
67
|
-
* @param knownReferences - Used to avoid traversing loops and not to copy
|
|
68
|
-
* references e.g. to objects not to copy (e.g. symbol polyfills).
|
|
69
|
-
* @param recursionLevel - Internally used to track current recursion level in
|
|
70
|
-
* given source data structure.
|
|
71
|
-
* @returns Value "true" if both objects are equal and "false" otherwise.
|
|
72
|
-
*/
|
|
73
|
-
export declare const copy: <Type = unknown>(source: Type, copyBlobs?: boolean, recursionLimit?: number, recursionEndValue?: unknown, destination?: null | Type, cyclic?: boolean, knownReferences?: Array<unknown>, recursionLevel?: number) => Type;
|
|
74
|
-
/**
|
|
75
|
-
* Determine the internal JavaScript [[Class]] of an object.
|
|
76
|
-
* @param value - Value to analyze.
|
|
77
|
-
* @returns Name of determined type.
|
|
78
|
-
*/
|
|
79
|
-
export declare const determineType: (value?: unknown) => string;
|
|
80
|
-
/**
|
|
81
|
-
* Returns true if given items are equal for given property list. If
|
|
82
|
-
* property list isn't set all properties will be checked. All keys which
|
|
83
|
-
* starts with one of the exception prefixes will be omitted.
|
|
84
|
-
* @param firstValue - First object to compare.
|
|
85
|
-
* @param secondValue - Second object to compare.
|
|
86
|
-
* @param givenOptions - Options to define how to compare.
|
|
87
|
-
* @param givenOptions.properties - Property names to check. Check all if
|
|
88
|
-
* "null" is selected (default).
|
|
89
|
-
* @param givenOptions.deep - Recursion depth negative values means
|
|
90
|
-
* infinitely deep (default).
|
|
91
|
-
* @param givenOptions.exceptionPrefixes - Property prefixes which
|
|
92
|
-
* indicates properties to ignore.
|
|
93
|
-
* @param givenOptions.ignoreFunctions - Indicates whether functions have
|
|
94
|
-
* to be identical to interpret is as equal. If set to "true" two functions
|
|
95
|
-
* will be assumed to be equal (default).
|
|
96
|
-
* @param givenOptions.compareBlobs - Indicates whether binary data should
|
|
97
|
-
* be converted to a base64 string to compare their content. Makes this
|
|
98
|
-
* function asynchronous in browsers and potentially takes a lot of
|
|
99
|
-
* resources.
|
|
100
|
-
* @returns Value "true" if both objects are equal and "false" otherwise.
|
|
101
|
-
* If "compareBlobs" is activated, and we're running in a browser like
|
|
102
|
-
* environment and binary data is given, then a promise wrapping the
|
|
103
|
-
* determined boolean values is returned.
|
|
104
|
-
*/
|
|
105
|
-
export declare const equals: (firstValue: unknown, secondValue: unknown, givenOptions?: Partial<CompareOptions>) => boolean | Promise<boolean | string> | string;
|
|
106
|
-
/**
|
|
107
|
-
* Searches for nested mappings with given indicator key and resolves
|
|
108
|
-
* marked values. Additionally, all objects are wrapped with a proxy to
|
|
109
|
-
* dynamically resolve nested properties.
|
|
110
|
-
* @param object - Given mapping to resolve.
|
|
111
|
-
* @param scope - Scope to use evaluate again.
|
|
112
|
-
* @param selfReferenceName - Name to use for reference to given object.
|
|
113
|
-
* @param expressionIndicatorKey - Indicator property name to mark a value
|
|
114
|
-
* to evaluate.
|
|
115
|
-
* @param executionIndicatorKey - Indicator property name to mark a value
|
|
116
|
-
* to evaluate.
|
|
117
|
-
* @returns Evaluated given mapping.
|
|
118
|
-
*/
|
|
119
|
-
export declare const evaluateDynamicData: <Type = unknown>(object: null | RecursiveEvaluateable<Type>, scope?: Mapping<unknown>, selfReferenceName?: string, expressionIndicatorKey?: string, executionIndicatorKey?: string) => Type;
|
|
120
|
-
/**
|
|
121
|
-
* Removes properties in objects where a dynamic indicator lives.
|
|
122
|
-
* @param data - Object to traverse recursively.
|
|
123
|
-
* @param expressionIndicators - Property key to remove.
|
|
124
|
-
* @returns Given object with removed properties.
|
|
125
|
-
*/
|
|
126
|
-
export declare const removeKeysInEvaluation: <T extends Mapping<unknown> = Mapping<unknown>>(data: T, expressionIndicators?: Array<string>) => T;
|
|
127
|
-
/**
|
|
128
|
-
* Extends given target object with given sources object. As target and
|
|
129
|
-
* sources many expandable types are allowed but target and sources have to
|
|
130
|
-
* come from the same type.
|
|
131
|
-
* @param targetOrDeepIndicator - Maybe the target or deep indicator.
|
|
132
|
-
* @param targetOrSource - Target or source object; depending on first
|
|
133
|
-
* argument.
|
|
134
|
-
* @param additionalSources - Source objects to extend into target.
|
|
135
|
-
* @returns Returns given target extended with all given sources.
|
|
136
|
-
*/
|
|
137
|
-
export declare const extend: <T = Mapping<unknown>>(targetOrDeepIndicator: (boolean | typeof IGNORE_NULL_AND_UNDEFINED_SYMBOL | RecursivePartial<T>), targetOrSource?: null | RecursivePartial<T>, ...additionalSources: Array<RecursivePartial<T>>) => T;
|
|
138
|
-
/**
|
|
139
|
-
* Generates a proxy handler which forwards all operations to given object
|
|
140
|
-
* as there wouldn't be a proxy.
|
|
141
|
-
* @param target - Object to proxy.
|
|
142
|
-
* @param methodNames - Mapping of operand name to object specific method
|
|
143
|
-
* name.
|
|
144
|
-
* @returns Determined proxy handler.
|
|
145
|
-
*/
|
|
146
|
-
export declare const getProxyHandler: <T = unknown>(target: T, methodNames?: Mapping) => ProxyHandler<T>;
|
|
147
|
-
/**
|
|
148
|
-
* Slices all properties from given object which does not match provided
|
|
149
|
-
* object mask. Items can be explicitly whitelisted via "include" mask
|
|
150
|
-
* configuration or black listed via "exclude" mask configuration.
|
|
151
|
-
* @param object - Object to slice.
|
|
152
|
-
* @param maskConfiguration - Mask configuration.
|
|
153
|
-
* @returns Given but sliced object. If (nested) object will be modified a
|
|
154
|
-
* flat copy of that object will be returned.
|
|
155
|
-
*/
|
|
156
|
-
export declare const mask: <Type extends Mapping<unknown> = Mapping<unknown>>(object: Type, maskConfiguration: ObjectMaskConfiguration) => RecursivePartial<Type>;
|
|
157
|
-
/**
|
|
158
|
-
* Modifies given target corresponding to given source and removes source
|
|
159
|
-
* modification infos.
|
|
160
|
-
* @param target - Object to modify.
|
|
161
|
-
* @param source - Source object to load modifications from.
|
|
162
|
-
* @param removeIndicatorKey - Indicator property name or value to mark a
|
|
163
|
-
* value to remove from object or list.
|
|
164
|
-
* @param prependIndicatorKey - Indicator property name to mark a value to
|
|
165
|
-
* prepend to target list.
|
|
166
|
-
* @param appendIndicatorKey - Indicator property name to mark a value to
|
|
167
|
-
* append to target list.
|
|
168
|
-
* @param positionPrefix - Indicates a prefix to use a value on given
|
|
169
|
-
* position to add or remove.
|
|
170
|
-
* @param positionSuffix - Indicates a suffix to use a value on given
|
|
171
|
-
* position to add or remove.
|
|
172
|
-
* @param parentSource - Source context to remove modification info from
|
|
173
|
-
* (usually only needed internally).
|
|
174
|
-
* @param parentKey - Source key in given source context to remove
|
|
175
|
-
* modification info from (usually only needed internally).
|
|
176
|
-
* @returns Given target modified with given source.
|
|
177
|
-
*/
|
|
178
|
-
export declare const modifyObject: <T = unknown>(target: T, source: unknown, removeIndicatorKey?: string, prependIndicatorKey?: string, appendIndicatorKey?: string, positionPrefix?: string, positionSuffix?: string, parentSource?: unknown, parentKey?: unknown) => T;
|
|
179
|
-
/**
|
|
180
|
-
* Removes given key from given object recursively.
|
|
181
|
-
* @param object - Object to process.
|
|
182
|
-
* @param keys - List of keys to remove.
|
|
183
|
-
* @returns Processed given object.
|
|
184
|
-
*/
|
|
185
|
-
export declare const removeKeyPrefixes: <T>(object: T, keys?: Array<string> | string) => T;
|
|
186
|
-
/**
|
|
187
|
-
* Represents given object as formatted string.
|
|
188
|
-
* @param object - Object to represent.
|
|
189
|
-
* @param maximumLengthOfLists - Maximum number of array item to render.
|
|
190
|
-
* @param indention - String (usually whitespaces) to use as indention.
|
|
191
|
-
* @param initialIndention - String (usually whitespaces) to use as
|
|
192
|
-
* additional indention for the first object traversing level.
|
|
193
|
-
* @param maximumNumberOfLevelsReachedIdentifier - Replacement for objects
|
|
194
|
-
* which are out of specified bounds to traverse.
|
|
195
|
-
* @param numberOfLevels - Specifies number of levels to traverse given
|
|
196
|
-
* data structure.
|
|
197
|
-
* @returns Representation string.
|
|
198
|
-
*/
|
|
199
|
-
export declare const represent: (object: unknown, maximumLengthOfLists?: number, indention?: string, initialIndention?: string, maximumNumberOfLevelsReachedIdentifier?: number | string, numberOfLevels?: number) => string;
|
|
200
|
-
/**
|
|
201
|
-
* Sort given objects keys.
|
|
202
|
-
* @param object - Object which keys should be sorted.
|
|
203
|
-
* @returns Sorted list of given keys.
|
|
204
|
-
*/
|
|
205
|
-
export declare const sort: (object: unknown) => Array<unknown>;
|
|
206
|
-
/**
|
|
207
|
-
* Removes a proxy from given data structure recursively.
|
|
208
|
-
* @param object - Object to proxy.
|
|
209
|
-
* @param seenObjects - Tracks all already processed objects to avoid
|
|
210
|
-
* endless loops (usually only needed for internal purpose).
|
|
211
|
-
* @returns Returns given object unwrapped from a dynamic proxy.
|
|
212
|
-
*/
|
|
213
|
-
export declare const unwrapProxy: <T = unknown>(object: ProxyType<T> | T, seenObjects?: Set<unknown>) => T;
|
package/dist/process.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ChildProcess } from 'child_process';
|
|
2
|
-
import { AnyFunction, ProcessCloseCallback, ProcessErrorCallback, ProcessHandler } from './type';
|
|
3
|
-
/**
|
|
4
|
-
* Generates a one shot close handler which triggers given promise methods.
|
|
5
|
-
* If a reason is provided it will be given as resolve target. An Error will be
|
|
6
|
-
* generated if return code is not zero. The generated Error has a property
|
|
7
|
-
* "returnCode" which provides corresponding process return code.
|
|
8
|
-
* @param resolve - Promise's resolve function.
|
|
9
|
-
* @param reject - Promise's reject function.
|
|
10
|
-
* @param reason - Promise target if process has a zero return code.
|
|
11
|
-
* @param callback - Optional function to call of process has successfully
|
|
12
|
-
* finished.
|
|
13
|
-
* @returns Process close handler function.
|
|
14
|
-
*/
|
|
15
|
-
export declare const getProcessCloseHandler: (resolve: ProcessCloseCallback, reject: ProcessErrorCallback, reason?: unknown, callback?: AnyFunction) => ProcessHandler;
|
|
16
|
-
/**
|
|
17
|
-
* Forwards given child process communication channels to corresponding current
|
|
18
|
-
* process communication channels.
|
|
19
|
-
* @param childProcess - Child process meta data.
|
|
20
|
-
* @returns Given child process meta data.
|
|
21
|
-
*/
|
|
22
|
-
export declare const handleChildProcess: (childProcess: ChildProcess) => ChildProcess;
|