clientnode 4.0.1436 → 4.0.1437
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 +83 -94
- package/dist/Logger.js +163 -715
- package/dist/Semaphore.js +46 -81
- package/dist/array.js +337 -568
- package/dist/cli.js +37 -71
- package/dist/constants.js +110 -209
- package/dist/context.js +25 -229
- package/dist/cookie.js +48 -226
- package/dist/data-transfer.js +166 -725
- package/dist/datetime.js +241 -1059
- package/dist/domNode.js +277 -441
- package/dist/expression/evaluators.js +234 -1112
- package/dist/expression/helper.js +82 -135
- package/dist/expression/index.js +10 -1245
- package/dist/expression/indicator-functions.js +21 -239
- package/dist/expression/type.js +4 -34
- package/dist/filesystem.js +323 -309
- package/dist/function.js +51 -125
- package/dist/index.js +26 -2709
- package/dist/indicators.js +68 -440
- package/dist/module.js +78 -164
- package/dist/number.js +25 -423
- package/dist/object.js +771 -852
- package/dist/process.js +39 -245
- package/dist/property-types.js +96 -157
- package/dist/scope.js +56 -1825
- package/dist/string.js +603 -909
- package/dist/test-helper.js +171 -541
- package/dist/type.js +8 -37
- package/dist/utility.js +91 -336
- package/package.json +2 -2
- 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 -111
- package/dist/bundle/Logger.js +0 -705
- package/dist/bundle/Semaphore.js +0 -100
- package/dist/bundle/array.js +0 -648
- package/dist/bundle/cli.js +0 -85
- package/dist/bundle/constants.js +0 -225
- package/dist/bundle/context.js +0 -243
- package/dist/bundle/cookie.js +0 -262
- package/dist/bundle/data-transfer.js +0 -741
- package/dist/bundle/datetime.js +0 -1064
- package/dist/bundle/domNode.js +0 -471
- package/dist/bundle/expression/evaluators.js +0 -1115
- package/dist/bundle/expression/helper.js +0 -106
- package/dist/bundle/expression/index.js +0 -1223
- package/dist/bundle/expression/indicator-functions.js +0 -235
- package/dist/bundle/expression/type.js +0 -50
- package/dist/bundle/filesystem.js +0 -374
- package/dist/bundle/function.js +0 -105
- package/dist/bundle/index.js +0 -2686
- package/dist/bundle/indicators.js +0 -459
- package/dist/bundle/module.js +0 -180
- package/dist/bundle/number.js +0 -425
- package/dist/bundle/object.js +0 -1004
- package/dist/bundle/process.js +0 -275
- package/dist/bundle/property-types.js +0 -167
- package/dist/bundle/scope.js +0 -1808
- package/dist/bundle/string.js +0 -1095
- package/dist/bundle/test-helper.js +0 -690
- package/dist/bundle/type.js +0 -50
- package/dist/bundle/utility.js +0 -362
- package/dist/cli.d.ts +0 -31
- package/dist/compatible/Lock.js +0 -111
- package/dist/compatible/Logger.js +0 -705
- package/dist/compatible/Semaphore.js +0 -100
- package/dist/compatible/array.js +0 -648
- package/dist/compatible/cli.js +0 -85
- package/dist/compatible/constants.js +0 -225
- package/dist/compatible/context.js +0 -243
- package/dist/compatible/cookie.js +0 -262
- package/dist/compatible/data-transfer.js +0 -741
- package/dist/compatible/datetime.js +0 -1064
- package/dist/compatible/domNode.js +0 -471
- package/dist/compatible/expression/evaluators.js +0 -1115
- package/dist/compatible/expression/helper.js +0 -106
- package/dist/compatible/expression/index.js +0 -1223
- package/dist/compatible/expression/indicator-functions.js +0 -235
- package/dist/compatible/expression/type.js +0 -50
- package/dist/compatible/filesystem.js +0 -374
- package/dist/compatible/function.js +0 -105
- package/dist/compatible/index.js +0 -2686
- package/dist/compatible/indicators.js +0 -459
- package/dist/compatible/module.js +0 -180
- package/dist/compatible/number.js +0 -425
- package/dist/compatible/object.js +0 -1004
- package/dist/compatible/process.js +0 -275
- package/dist/compatible/property-types.js +0 -167
- package/dist/compatible/scope.js +0 -1808
- package/dist/compatible/string.js +0 -1095
- package/dist/compatible/test-helper.js +0 -690
- package/dist/compatible/type.js +0 -50
- package/dist/compatible/utility.js +0 -362
- package/dist/constants.d.ts +0 -99
- package/dist/context.d.ts +0 -8
- 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/type.d.ts +0 -70
- package/dist/filesystem.d.ts +0 -143
- package/dist/function.d.ts +0 -20
- package/dist/index.d.ts +0 -23
- package/dist/indicators.d.ts +0 -68
- package/dist/module.d.ts +0 -8
- package/dist/number.d.ts +0 -35
- package/dist/object.d.ts +0 -231
- package/dist/process.d.ts +0 -22
- package/dist/property-types.d.ts +0 -460
- package/dist/scope.d.ts +0 -44
- package/dist/string.d.ts +0 -312
- 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 -230
- package/dist/utility.d.ts +0 -44
package/dist/string.d.ts
DELETED
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
import type { CompilationResult, EvaluationResult, Mapping, PlainObject, StringMarkOptions, QueryParameters } from './type';
|
|
2
|
-
export declare const POLYFILL_TEMPLATE_STRINGS: {
|
|
3
|
-
value: boolean;
|
|
4
|
-
};
|
|
5
|
-
export declare const ALLOWED_VARIABLE_SYMBOLS = "0-9a-zA-Z_$";
|
|
6
|
-
export declare const ALLOWED_STARTING_VARIABLE_SYMBOLS = "a-zA-Z_$";
|
|
7
|
-
export declare const FIX_ENCODING_ERROR_MAPPING: readonly [readonly ["Ã\\x84", "Ä"], readonly ["Ã\\x96", "Ö"], readonly ["Ã\\x9c", "Ü"], readonly ["ä", "ä"], readonly ["ö", "ö"], readonly ["ü", "ü"], readonly ["\\x96", "-"], readonly ["é", "é"], readonly ["è", "e"], readonly ["ô", "o"], readonly ["à ", "á"], readonly ["ø", "ø"], readonly ["Ã\\x9f", "ß"], readonly ["Ã", "ß"]];
|
|
8
|
-
/**
|
|
9
|
-
* Translates a given string into the regular expression validated
|
|
10
|
-
* representation.
|
|
11
|
-
* @param value - String to convert.
|
|
12
|
-
* @param excludeSymbols - Symbols not to escape.
|
|
13
|
-
* @returns Converted string.
|
|
14
|
-
*/
|
|
15
|
-
export declare const escapeRegularExpressions: (value: string, excludeSymbols?: Array<string>) => string;
|
|
16
|
-
/**
|
|
17
|
-
* Translates a given name into a valid JavaScript one.
|
|
18
|
-
* @param name - Name to convert.
|
|
19
|
-
* @returns Converted name is returned.
|
|
20
|
-
*/
|
|
21
|
-
export declare const convertToValidVariableName: (name: string) => string;
|
|
22
|
-
/**
|
|
23
|
-
* This method is intended for encoding *key* or *value* parts of a query
|
|
24
|
-
* component. We need a custom method because "encodeURIComponent()" is too
|
|
25
|
-
* aggressive and encodes stuff that doesn't have to be encoded per
|
|
26
|
-
* "http://tools.ietf.org/html/rfc3986:".
|
|
27
|
-
* @param url - URL to encode.
|
|
28
|
-
* @param encodeSpaces - Indicates whether given url should encode
|
|
29
|
-
* whitespaces as "+" or "%20".
|
|
30
|
-
* @returns Encoded given url.
|
|
31
|
-
*/
|
|
32
|
-
export declare const encodeURIComponentExtended: (url: string, encodeSpaces?: boolean) => string;
|
|
33
|
-
/**
|
|
34
|
-
* Appends a path selector to the given path if there isn't one yet.
|
|
35
|
-
* @param path - The path for appending a selector.
|
|
36
|
-
* @param pathSeparator - The selector for appending to a path.
|
|
37
|
-
* @returns The appended path.
|
|
38
|
-
*/
|
|
39
|
-
export declare const addSeparatorToPath: (path: string, pathSeparator?: string) => string;
|
|
40
|
-
/**
|
|
41
|
-
* Checks if a given path has given path prefix.
|
|
42
|
-
* @param prefix - Path prefix to search for.
|
|
43
|
-
* @param path - Path to search in.
|
|
44
|
-
* @param separator - Delimiter to use in a path (default is the posix
|
|
45
|
-
* conform slash).
|
|
46
|
-
* @returns Value "true" if given prefix occurs and "false" otherwise.
|
|
47
|
-
*/
|
|
48
|
-
export declare const hasPathPrefix: (prefix?: unknown, path?: string, separator?: string) => boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Extracts domain name from given url. If no explicit domain name given
|
|
51
|
-
* current domain name will be assumed. If no parameter is given, the current
|
|
52
|
-
* domain name will be determined.
|
|
53
|
-
* @param url - The url to extract domain from.
|
|
54
|
-
* @param fallback - The fallback host name if no one exits in given url
|
|
55
|
-
* (default is current hostname).
|
|
56
|
-
* @returns Extracted domain.
|
|
57
|
-
*/
|
|
58
|
-
export declare const getDomainName: (url?: string, fallback?: string) => string;
|
|
59
|
-
/**
|
|
60
|
-
* Extracts port number from given url. If no explicit port number is given
|
|
61
|
-
* and no fallback is defined, the current port number will be assumed for local
|
|
62
|
-
* links. For external links 80 will be assumed for http protocols and 443
|
|
63
|
-
* for https protocols.
|
|
64
|
-
* @param url - The url to extract port from.
|
|
65
|
-
* @param fallback - Fallback port number if no explicit one was found.
|
|
66
|
-
* Default is derived from the current protocol name.
|
|
67
|
-
* @returns Extracted port number.
|
|
68
|
-
*/
|
|
69
|
-
export declare const getPortNumber: (url?: string, fallback?: null | number) => null | number;
|
|
70
|
-
/**
|
|
71
|
-
* Extracts protocol name from given url. If no explicit url is given,
|
|
72
|
-
* the current protocol will be assumed. If no parameter is given, the current
|
|
73
|
-
* protocol number will be determined.
|
|
74
|
-
* @param url - The url to extract protocol from.
|
|
75
|
-
* @param fallback - Fallback port to use if no protocol exists in given
|
|
76
|
-
* url (default is current protocol).
|
|
77
|
-
* @returns Extracted protocol.
|
|
78
|
-
*/
|
|
79
|
-
export declare const getProtocolName: (url?: string, fallback?: string) => string;
|
|
80
|
-
/**
|
|
81
|
-
* Read a page's GET URL variables and return them as an associative array
|
|
82
|
-
* and preserves ordering.
|
|
83
|
-
* @param keyToGet - If provided the corresponding value for a given key is
|
|
84
|
-
* returned or full object otherwise.
|
|
85
|
-
* @param allowDuplicates - Indicates whether to return arrays of values or
|
|
86
|
-
* single values. If set to "false" (default) last values will overwrite
|
|
87
|
-
* preceding values.
|
|
88
|
-
* @param givenInput - An alternative input to the url search parameter. If
|
|
89
|
-
* "#" is given, the complete current hashtag will be interpreted as url and
|
|
90
|
-
* search parameter will be extracted from there. If "&" is given a classical
|
|
91
|
-
* search parameter, and hash parameter will be taken in an account. If a
|
|
92
|
-
* search string is given, this will be analyzed. The default is to take a
|
|
93
|
-
* given search part into account.
|
|
94
|
-
* @param subDelimiter - Defines which sequence indicates the start of
|
|
95
|
-
* parameter in a hash part of the url.
|
|
96
|
-
* @param hashedPathIndicator - If defined and given hash starts with this
|
|
97
|
-
* indicator, given hash will be interpreted as a path containing search and
|
|
98
|
-
* hash parts.
|
|
99
|
-
* @param givenSearch - Search part to take into account defaults to
|
|
100
|
-
* current url search part.
|
|
101
|
-
* @param givenHash - Hash part to take into account defaults to current
|
|
102
|
-
* url hash part.
|
|
103
|
-
* @returns Returns the current get array or requested value. If the requested
|
|
104
|
-
* key doesn't exist, "undefined" is returned.
|
|
105
|
-
*/
|
|
106
|
-
export declare const getURLParameter: (keyToGet?: null | string, allowDuplicates?: boolean, givenInput?: null | string, subDelimiter?: string, hashedPathIndicator?: string, givenSearch?: null | string, givenHash?: null | string) => Array<string> | null | QueryParameters | string;
|
|
107
|
-
/**
|
|
108
|
-
* Checks if given url points to another "service" than the second given url.
|
|
109
|
-
* If no second given url is provided, the current url will be assumed.
|
|
110
|
-
* @param url - URL to check against second url.
|
|
111
|
-
* @param referenceURL - URL to check against first url.
|
|
112
|
-
* @returns Returns "true" if given first url has same domain as given
|
|
113
|
-
* second (or current).
|
|
114
|
-
*/
|
|
115
|
-
export declare const serviceURLEquals: (url: string, referenceURL?: string) => boolean;
|
|
116
|
-
/**
|
|
117
|
-
* Normalized given website url.
|
|
118
|
-
* @param givenURL - Uniform resource locator to normalize.
|
|
119
|
-
* @returns Normalized result.
|
|
120
|
-
*/
|
|
121
|
-
export declare const normalizeURL: (givenURL: unknown) => string;
|
|
122
|
-
/**
|
|
123
|
-
* Represents given website url.
|
|
124
|
-
* @param url - Uniform resource locator to represent.
|
|
125
|
-
* @returns Represented result.
|
|
126
|
-
*/
|
|
127
|
-
export declare const representURL: (url: unknown) => string;
|
|
128
|
-
/**
|
|
129
|
-
* Converts a camel-cased string to its delimited string version.
|
|
130
|
-
* @param value - The string to format.
|
|
131
|
-
* @param delimiter - Defines delimiter string.
|
|
132
|
-
* @param abbreviations - Collection of shortcut words to represent uppercased.
|
|
133
|
-
* @returns The formatted string.
|
|
134
|
-
*/
|
|
135
|
-
export declare const camelCaseToDelimited: (value: string, delimiter?: string, abbreviations?: Array<string> | null) => string;
|
|
136
|
-
/**
|
|
137
|
-
* Converts a string to its capitalized representation.
|
|
138
|
-
* @param string - The string to format.
|
|
139
|
-
* @returns The formatted string.
|
|
140
|
-
*/
|
|
141
|
-
export declare const capitalize: (string: string) => string;
|
|
142
|
-
/**
|
|
143
|
-
* Compresses given style attribute value.
|
|
144
|
-
* @param styleValue - Style value to compress.
|
|
145
|
-
* @returns The compressed value.
|
|
146
|
-
*/
|
|
147
|
-
export declare const compressStyleValue: (styleValue: string) => string;
|
|
148
|
-
/**
|
|
149
|
-
* Decodes all html symbols in text nodes in a given html string.
|
|
150
|
-
* @param htmlString - HTML string to decode.
|
|
151
|
-
* @returns Decoded html string.
|
|
152
|
-
*/
|
|
153
|
-
export declare const decodeHTMLEntities: (htmlString: string) => null | string;
|
|
154
|
-
/**
|
|
155
|
-
* Converts a delimited string to its camel case representation.
|
|
156
|
-
* @param value - The string to format.
|
|
157
|
-
* @param delimiter - Delimiter string to use.
|
|
158
|
-
* @param abbreviations - Collection of shortcut words to represent uppercased.
|
|
159
|
-
* @param preserveWrongFormattedAbbreviations - If set to "True" wrong
|
|
160
|
-
* formatted camel case abbreviations will be ignored.
|
|
161
|
-
* @param removeMultipleDelimiter - Indicates whether a series of delimiter
|
|
162
|
-
* should be consolidated.
|
|
163
|
-
* @returns The formatted string.
|
|
164
|
-
*/
|
|
165
|
-
export declare const delimitedToCamelCase: (value: string, delimiter?: string, abbreviations?: Array<string> | null, preserveWrongFormattedAbbreviations?: boolean, removeMultipleDelimiter?: boolean) => string;
|
|
166
|
-
/**
|
|
167
|
-
* Compiles a given string as an expression with given scope names.
|
|
168
|
-
* @param expression - The string to interpret.
|
|
169
|
-
* @param scope - Scope to extract names from.
|
|
170
|
-
* @param execute - Indicates whether to execute or evaluate.
|
|
171
|
-
* @param removeGlobalScope - Indicates whether to shadow global variables via
|
|
172
|
-
* "undefined".
|
|
173
|
-
* @param binding - Object to apply as "this" in evaluation scope.
|
|
174
|
-
* @returns Object of prepared scope name mappings and compiled function or
|
|
175
|
-
* error string message if given expression couldn't be compiled.
|
|
176
|
-
*/
|
|
177
|
-
export declare const compile: <T = string, N extends Array<string> = Array<string>>(expression: string, scope?: Mapping<unknown> | N | N[number] | string, execute?: boolean, removeGlobalScope?: boolean, binding?: unknown) => CompilationResult<T, N>;
|
|
178
|
-
/**
|
|
179
|
-
* Evaluates a given string as an expression against a given scope.
|
|
180
|
-
* @param expression - The string to interpret.
|
|
181
|
-
* @param scope - Scope to render against.
|
|
182
|
-
* @param execute - Indicates whether to execute or evaluate.
|
|
183
|
-
* @param removeGlobalScope - Indicates whether to shadow global variables via
|
|
184
|
-
* "undefined".
|
|
185
|
-
* @param binding - Object to apply as "this" in evaluation scope.
|
|
186
|
-
* @returns Object with an error message during parsing / running or result.
|
|
187
|
-
*/
|
|
188
|
-
export declare const evaluate: <T = string, S extends object = object>(expression: string, scope?: S, execute?: boolean, removeGlobalScope?: boolean, binding?: unknown) => EvaluationResult<T>;
|
|
189
|
-
/**
|
|
190
|
-
* Evaluates a given string as an expression against a given scope. Does same
|
|
191
|
-
* as "evaluate" but throws an exception if an error occurs and returns the
|
|
192
|
-
* evaluated value instead of an object with error and result.
|
|
193
|
-
* @param expression - The string to interpret.
|
|
194
|
-
* @param scope - Scope to render against.
|
|
195
|
-
* @param execute - Indicates whether to execute or evaluate.
|
|
196
|
-
* @param removeGlobalScope - Indicates whether to shadow global variables via
|
|
197
|
-
* "undefined".
|
|
198
|
-
* @param binding - Object to apply as "this" in evaluation scope.
|
|
199
|
-
* @returns Object with an error message during parsing / running or result.
|
|
200
|
-
*/
|
|
201
|
-
export declare const evaluateAndThrowError: <Result = string, Scope extends object = object>(expression: string, scope?: Scope, execute?: boolean, removeGlobalScope?: boolean, binding?: unknown) => Result;
|
|
202
|
-
/**
|
|
203
|
-
* Finds the string match of a given query in a given target text by applying a
|
|
204
|
-
* given normalization function to target and query.
|
|
205
|
-
* @param target - Target to search in.
|
|
206
|
-
* @param query - Search string to search for.
|
|
207
|
-
* @param normalizer - Function to use as normalization for queries and search
|
|
208
|
-
* targets.
|
|
209
|
-
* @param skipTagDelimitedParts - Indicates whether to, for example, ignore
|
|
210
|
-
* html tags via "['<', '>']" (the default).
|
|
211
|
-
* @returns Start and end index of matching range.
|
|
212
|
-
*/
|
|
213
|
-
export declare const findNormalizedMatchRange: (target: unknown, query: unknown, normalizer?: (value: unknown) => string, skipTagDelimitedParts?: null | [string, string]) => Array<number> | null;
|
|
214
|
-
/**
|
|
215
|
-
* Fixes known encoding problems in given data.
|
|
216
|
-
* @param data - To process.
|
|
217
|
-
* @returns Processed data.
|
|
218
|
-
*/
|
|
219
|
-
export declare const fixKnownEncodingErrors: (data: string) => string;
|
|
220
|
-
/**
|
|
221
|
-
* Performs a string formation. Replaces every placeholder "{i}" with the i'th
|
|
222
|
-
* argument.
|
|
223
|
-
* @param string - The string to format.
|
|
224
|
-
* @param additionalArguments - Additional arguments are interpreted as
|
|
225
|
-
* replacements for string formatting.
|
|
226
|
-
* @returns The formatted string.
|
|
227
|
-
*/
|
|
228
|
-
export declare const format: (string: string, ...additionalArguments: Array<unknown>) => string;
|
|
229
|
-
/**
|
|
230
|
-
* Calculates the edit (levenstein) distance between two given strings.
|
|
231
|
-
* @param first - First string to compare.
|
|
232
|
-
* @param second - Second string to compare.
|
|
233
|
-
* @returns The distance as number.
|
|
234
|
-
*/
|
|
235
|
-
export declare const getEditDistance: (first: string, second: string) => number;
|
|
236
|
-
/**
|
|
237
|
-
* Validates the current string for using in a regular expression pattern.
|
|
238
|
-
* Special regular expression chars will be escaped.
|
|
239
|
-
* @param value - The string to format.
|
|
240
|
-
* @returns The formatted string.
|
|
241
|
-
*/
|
|
242
|
-
export declare const maskForRegularExpression: (value: string) => string;
|
|
243
|
-
/**
|
|
244
|
-
* Converts a string to its lower case representation.
|
|
245
|
-
* @param string - The string to format.
|
|
246
|
-
* @returns The formatted string.
|
|
247
|
-
*/
|
|
248
|
-
export declare const lowerCase: (string: string) => string;
|
|
249
|
-
/**
|
|
250
|
-
* Wraps given mark strings in a given target with a given marker.
|
|
251
|
-
* @param target - String to search for marker.
|
|
252
|
-
* @param givenWords - String or array of strings to search in target for.
|
|
253
|
-
* @param givenOptions - Defines highlighting behavior.
|
|
254
|
-
* @param givenOptions.marker - HTML template string to mark.
|
|
255
|
-
* @param givenOptions.normalizer - Pure normalization function to use before
|
|
256
|
-
* searching for matches.
|
|
257
|
-
* @param givenOptions.skipTagDelimitedParts - Indicates whether to, for
|
|
258
|
-
* example, ignore html tags via "['<', '>']" (the default).
|
|
259
|
-
* @returns Processed result.
|
|
260
|
-
*/
|
|
261
|
-
export declare const mark: (target: unknown, givenWords?: Array<string> | string, givenOptions?: Partial<StringMarkOptions>) => unknown;
|
|
262
|
-
/**
|
|
263
|
-
* Normalizes a given phone number for automatic dialing or comparison.
|
|
264
|
-
* @param value - Number to normalize.
|
|
265
|
-
* @param dialable - Indicates whether the result should be dialed or
|
|
266
|
-
* represented as lossless data.
|
|
267
|
-
* @returns Normalized number.
|
|
268
|
-
*/
|
|
269
|
-
export declare const normalizePhoneNumber: (value: unknown, dialable?: boolean) => string;
|
|
270
|
-
/**
|
|
271
|
-
* Normalizes a given zip code for automatic address processing.
|
|
272
|
-
* @param value - Number to normalize.
|
|
273
|
-
* @returns Normalized number.
|
|
274
|
-
*/
|
|
275
|
-
export declare const normalizeZipCode: (value: unknown) => string;
|
|
276
|
-
/**
|
|
277
|
-
* Converts a given serialized, base64 encoded or file path given object into a
|
|
278
|
-
* native JavaScript one if possible.
|
|
279
|
-
* @param serializedObject - Object as string.
|
|
280
|
-
* @param scope - An optional scope which will be used to evaluate given object
|
|
281
|
-
* in.
|
|
282
|
-
* @param name - The name under given scope will be available.
|
|
283
|
-
* @returns The parsed object if possible and null otherwise.
|
|
284
|
-
*/
|
|
285
|
-
export declare const parseEncodedObject: <T = PlainObject>(serializedObject: string, scope?: Mapping<unknown>, name?: string) => null | T;
|
|
286
|
-
/**
|
|
287
|
-
* Represents a given phone number. NOTE: Currently only support German phone
|
|
288
|
-
* numbers.
|
|
289
|
-
* @param value - Number to format.
|
|
290
|
-
* @returns Formatted number.
|
|
291
|
-
*/
|
|
292
|
-
export declare const representPhoneNumber: (value: unknown) => string;
|
|
293
|
-
/**
|
|
294
|
-
* Slices all none numbers but preserves last separator.
|
|
295
|
-
* @param value - String to process.
|
|
296
|
-
* @returns - Sliced given value.
|
|
297
|
-
*/
|
|
298
|
-
export declare const sliceAllExceptNumberAndLastSeparator: (value: string) => string;
|
|
299
|
-
/**
|
|
300
|
-
* Converts a dom selector to a prefixed dom selector string.
|
|
301
|
-
* @param selector - A dom node selector.
|
|
302
|
-
* @param selectorPrefix - A dom node selector prefix to take into account.
|
|
303
|
-
* @returns Returns given selector prefixed.
|
|
304
|
-
*/
|
|
305
|
-
export declare const normalizeDomNodeSelector: (selector: string, selectorPrefix?: string) => string;
|
|
306
|
-
/**
|
|
307
|
-
* Abbreviates a given string if it excesses a given limit.
|
|
308
|
-
* @param value - String to abbreviate.
|
|
309
|
-
* @param limit - Maximum length of processed string.
|
|
310
|
-
* @returns Abbreviated given string.
|
|
311
|
-
*/
|
|
312
|
-
export declare const limit: (value: string, limit?: number) => string;
|
package/dist/test/Lock.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/Logger.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/Semaphore.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/array.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/cookie.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/datetime.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/domNode.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/function.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/number.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/object.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/process.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/scope.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/string.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/utility.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test-helper.d.ts
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import type { AnyFunction, FirstParameter, FunctionTestTuple, FunctionTestPromiseTuple, FunctionTestPromiseRejectionTuple, TestMatchers as Matchers, TestSymbol, ThenParameter, UnknownFunction } from './type';
|
|
2
|
-
export declare const TEST_DEFINED_SYMBOL: unique symbol;
|
|
3
|
-
export declare const TEST_THROW_SYMBOL: unique symbol;
|
|
4
|
-
export declare const TEST_UNDEFINED_SYMBOL: unique symbol;
|
|
5
|
-
/**
|
|
6
|
-
* Tests given result against given expectations. Respects special symbol
|
|
7
|
-
* values.
|
|
8
|
-
* @param givenResult - Target to compare expectation against.
|
|
9
|
-
* @param expected - Expected result.
|
|
10
|
-
* @param wrap - Indicates whether to wrap with an expect function call.
|
|
11
|
-
* @returns Nothing or a promise resolving to nothing.
|
|
12
|
-
*/
|
|
13
|
-
export declare const expectExpectedType: <Type = unknown, Result extends Promise<void> | void = void>(givenResult: Matchers<Result> | Result, expected: TestSymbol | Type, wrap?: boolean) => Result;
|
|
14
|
-
/**
|
|
15
|
-
* Tests each given test set (expected value follows by various list of
|
|
16
|
-
* function parameters). It respects function signature to raise compile time
|
|
17
|
-
* errors if given test set does not match given function signature.
|
|
18
|
-
* @param functionName - Function description to test.
|
|
19
|
-
* @param callback - Function reference to test.
|
|
20
|
-
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
21
|
-
* function again.
|
|
22
|
-
*/
|
|
23
|
-
export declare const testEach: {
|
|
24
|
-
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestTuple<FunctionType>>): void;
|
|
25
|
-
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestTuple<FunctionType>>): void;
|
|
26
|
-
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestTuple<FunctionType>>): void;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Tests each given test set (expected value follows by various list of
|
|
30
|
-
* function parameters). It respects function signature to raise compile time
|
|
31
|
-
* errors if given test set does not match given function signature.
|
|
32
|
-
* @param functionName - Function description to test.
|
|
33
|
-
* @param callback - Function reference to test.
|
|
34
|
-
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
35
|
-
* function again.
|
|
36
|
-
*/
|
|
37
|
-
export declare const testEachPromise: {
|
|
38
|
-
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
|
|
39
|
-
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
|
|
40
|
-
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Tests each given test set (expected value follows by various list of
|
|
44
|
-
* function parameters). It respects function signature to raise compile time
|
|
45
|
-
* errors if given test set does not match given function signature.
|
|
46
|
-
* @param functionName - Function description to test.
|
|
47
|
-
* @param callback - Function reference to test.
|
|
48
|
-
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
49
|
-
* function again.
|
|
50
|
-
*/
|
|
51
|
-
export declare const testEachPromiseRejection: {
|
|
52
|
-
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
|
|
53
|
-
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
|
|
54
|
-
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Tests each given single parameter against same given expected value. It
|
|
58
|
-
* respects function signature to raise compile time errors if given test set
|
|
59
|
-
* does not match given function signature.
|
|
60
|
-
* @param functionName - Function description to test.
|
|
61
|
-
* @param callback - Function reference to test.
|
|
62
|
-
* @param expected - Value to check each function call return value against.
|
|
63
|
-
* @param parameters - Additional first parameters to test given function with.
|
|
64
|
-
*/
|
|
65
|
-
export declare const testEachSingleParameterAgainstSameExpectation: {
|
|
66
|
-
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
67
|
-
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
68
|
-
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* Tests each given single parameter against same given expected value. It
|
|
72
|
-
* respects function signature to raise compile time errors if given test set
|
|
73
|
-
* does not match given function signature.
|
|
74
|
-
* @param functionName - Function description to test.
|
|
75
|
-
* @param callback - Function reference to test.
|
|
76
|
-
* @param expected - Value to check each function call return value against.
|
|
77
|
-
* @param parameters - Additional first parameters to test given function with.
|
|
78
|
-
*/
|
|
79
|
-
export declare const testEachSingleParameterAgainstSamePromisedExpectation: {
|
|
80
|
-
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
81
|
-
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
82
|
-
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* Tests each given single parameter against same given expected value. It
|
|
86
|
-
* respects function signature to raise compile time errors if given test set
|
|
87
|
-
* does not match given function signature.
|
|
88
|
-
* @param functionName - Function description to test.
|
|
89
|
-
* @param callback - Function reference to test.
|
|
90
|
-
* @param expected - Value to check each function call return value against.
|
|
91
|
-
* @param parameters - Additional first parameters to test given function with.
|
|
92
|
-
*/
|
|
93
|
-
export declare const testEachSingleParameterAgainstSameRejectedExpectation: {
|
|
94
|
-
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
95
|
-
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
96
|
-
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* Tests each given test set (various list of function parameters) against same
|
|
100
|
-
* given expected value. It respects function signature to raise compile time
|
|
101
|
-
* errors if given test set does not match given function signature.
|
|
102
|
-
* @param functionName - Function description to test.
|
|
103
|
-
* @param callback - Function reference to test.
|
|
104
|
-
* @param expected - Value to check each function call return value against.
|
|
105
|
-
* @param functionParameters - Additional lists of parameters to test given
|
|
106
|
-
* function again.
|
|
107
|
-
*/
|
|
108
|
-
export declare const testEachAgainstSameExpectation: {
|
|
109
|
-
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
110
|
-
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
111
|
-
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
112
|
-
};
|
|
113
|
-
/**
|
|
114
|
-
* Tests each given test set (various list of function parameters) against same
|
|
115
|
-
* given expected value. It respects function signature to raise compile time
|
|
116
|
-
* errors if given test set does not match given function signature.
|
|
117
|
-
* @param functionName - Function description to test.
|
|
118
|
-
* @param callback - Function reference to test.
|
|
119
|
-
* @param expected - Value to check each function call return value against.
|
|
120
|
-
* @param functionParameters - Additional lists of parameters to test given
|
|
121
|
-
* function again.
|
|
122
|
-
*/
|
|
123
|
-
export declare const testEachPromiseAgainstSameExpectation: {
|
|
124
|
-
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
125
|
-
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
126
|
-
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
127
|
-
};
|
|
128
|
-
/**
|
|
129
|
-
* Tests each given test set (various list of function parameters) against same
|
|
130
|
-
* given expected value. It respects function signature to raise compile time
|
|
131
|
-
* errors if given test set does not match given function signature.
|
|
132
|
-
* @param functionName - Function description to test.
|
|
133
|
-
* @param callback - Function reference to test.
|
|
134
|
-
* @param expected - Value to check each function call return value against.
|
|
135
|
-
* @param functionParameters - Additional lists of parameters to test given
|
|
136
|
-
* function again.
|
|
137
|
-
*/
|
|
138
|
-
export declare const testEachPromiseRejectionAgainstSameExpectation: {
|
|
139
|
-
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
140
|
-
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
141
|
-
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
142
|
-
};
|
|
143
|
-
export default testEach;
|