clientnode 4.0.1490 → 4.0.1492

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.
Files changed (113) hide show
  1. package/dist/Lock.js +83 -68
  2. package/dist/Logger.js +163 -693
  3. package/dist/Semaphore.js +46 -55
  4. package/dist/array.js +337 -545
  5. package/dist/cli.js +37 -44
  6. package/dist/constants.js +110 -184
  7. package/dist/context.js +25 -209
  8. package/dist/cookie.js +48 -204
  9. package/dist/data-transfer.js +166 -701
  10. package/dist/datetime.js +245 -1042
  11. package/dist/domNode.js +277 -427
  12. package/dist/expression/evaluators.js +234 -1108
  13. package/dist/expression/helper.js +82 -100
  14. package/dist/expression/index.js +10 -1253
  15. package/dist/expression/indicator-functions.js +21 -208
  16. package/dist/expression/type.js +5 -1
  17. package/dist/filesystem.js +324 -286
  18. package/dist/function.js +51 -90
  19. package/dist/index.js +26 -3059
  20. package/dist/indicators.js +79 -418
  21. package/dist/module.js +109 -154
  22. package/dist/number.js +25 -397
  23. package/dist/object.js +803 -849
  24. package/dist/process.js +38 -200
  25. package/dist/property-types.js +96 -17
  26. package/dist/scope.js +56 -1982
  27. package/dist/string.js +626 -924
  28. package/dist/test-helper.js +289 -514
  29. package/dist/type.js +9 -4
  30. package/dist/utility.js +91 -310
  31. package/package.json +2 -2
  32. package/dist/Lock.d.ts +0 -39
  33. package/dist/Logger.d.ts +0 -102
  34. package/dist/Semaphore.d.ts +0 -29
  35. package/dist/array.d.ts +0 -150
  36. package/dist/bundle/index.js +0 -4507
  37. package/dist/cli.d.ts +0 -31
  38. package/dist/compatible/Lock.js +0 -85
  39. package/dist/compatible/Logger.js +0 -715
  40. package/dist/compatible/Semaphore.js +0 -74
  41. package/dist/compatible/array.js +0 -660
  42. package/dist/compatible/cli.js +0 -58
  43. package/dist/compatible/constants.js +0 -200
  44. package/dist/compatible/context.js +0 -224
  45. package/dist/compatible/cookie.js +0 -240
  46. package/dist/compatible/data-transfer.js +0 -751
  47. package/dist/compatible/datetime.js +0 -1083
  48. package/dist/compatible/domNode.js +0 -481
  49. package/dist/compatible/expression/evaluators.js +0 -1147
  50. package/dist/compatible/expression/helper.js +0 -115
  51. package/dist/compatible/expression/index.js +0 -1269
  52. package/dist/compatible/expression/indicator-functions.js +0 -224
  53. package/dist/compatible/expression/type.js +0 -16
  54. package/dist/compatible/filesystem.js +0 -373
  55. package/dist/compatible/function.js +0 -114
  56. package/dist/compatible/index.js +0 -3076
  57. package/dist/compatible/indicators.js +0 -471
  58. package/dist/compatible/module.js +0 -168
  59. package/dist/compatible/number.js +0 -433
  60. package/dist/compatible/object.js +0 -1037
  61. package/dist/compatible/process.js +0 -230
  62. package/dist/compatible/property-types.js +0 -36
  63. package/dist/compatible/scope.js +0 -2011
  64. package/dist/compatible/string.js +0 -1151
  65. package/dist/compatible/test-helper.js +0 -837
  66. package/dist/compatible/type.js +0 -16
  67. package/dist/compatible/utility.js +0 -358
  68. package/dist/constants.d.ts +0 -99
  69. package/dist/context.d.ts +0 -8
  70. package/dist/cookie.d.ts +0 -31
  71. package/dist/data-transfer.d.ts +0 -45
  72. package/dist/datetime.d.ts +0 -37
  73. package/dist/domNode.d.ts +0 -82
  74. package/dist/expression/evaluators.d.ts +0 -55
  75. package/dist/expression/helper.d.ts +0 -4
  76. package/dist/expression/index.d.ts +0 -7
  77. package/dist/expression/indicator-functions.d.ts +0 -14
  78. package/dist/expression/type.d.ts +0 -70
  79. package/dist/filesystem.d.ts +0 -143
  80. package/dist/function.d.ts +0 -20
  81. package/dist/index.d.ts +0 -23
  82. package/dist/indicators.d.ts +0 -68
  83. package/dist/module.d.ts +0 -10
  84. package/dist/number.d.ts +0 -35
  85. package/dist/object.d.ts +0 -231
  86. package/dist/process.d.ts +0 -22
  87. package/dist/property-types.d.ts +0 -460
  88. package/dist/scope.d.ts +0 -44
  89. package/dist/string.d.ts +0 -319
  90. package/dist/test/Lock.d.ts +0 -1
  91. package/dist/test/Logger.d.ts +0 -1
  92. package/dist/test/Semaphore.d.ts +0 -1
  93. package/dist/test/array.d.ts +0 -1
  94. package/dist/test/cookie.d.ts +0 -1
  95. package/dist/test/data-transfer.d.ts +0 -1
  96. package/dist/test/datetime.d.ts +0 -1
  97. package/dist/test/domNode.d.ts +0 -1
  98. package/dist/test/expression/evaluators.d.ts +0 -1
  99. package/dist/test/expression/helper.d.ts +0 -1
  100. package/dist/test/expression/indicator-functions.d.ts +0 -1
  101. package/dist/test/filesystem.d.ts +0 -1
  102. package/dist/test/function.d.ts +0 -1
  103. package/dist/test/indicators.d.ts +0 -1
  104. package/dist/test/number.d.ts +0 -1
  105. package/dist/test/object.d.ts +0 -1
  106. package/dist/test/process.d.ts +0 -1
  107. package/dist/test/property-types.d.ts +0 -1
  108. package/dist/test/scope.d.ts +0 -1
  109. package/dist/test/string.d.ts +0 -1
  110. package/dist/test/utility.d.ts +0 -1
  111. package/dist/test-helper.d.ts +0 -245
  112. package/dist/type.d.ts +0 -248
  113. package/dist/utility.d.ts +0 -44
package/dist/Logger.d.ts DELETED
@@ -1,102 +0,0 @@
1
- import type { LoggerOptions, Mapping } from './type';
2
- export declare const LEVELS: readonly ["error", "critical", "warn", "info", "debug"];
3
- export declare const LEVELS_COLOR: ("\u001B[0;34m" | "\u001B[32m" | "\u001B[35m" | "\u001B[31m" | "\u001B[33m")[];
4
- export type Level = typeof LEVELS[number];
5
- /**
6
- * This plugin provides such interface logic like generic controller logic for
7
- * integrating plugins into $, mutual exclusion for dependent gui elements,
8
- * logging additional string, array or function handling. A set of helper
9
- * functions to parse option objects dom trees or handle events is also
10
- * provided.
11
- * @property level - Logging level.
12
- * @property name - Logger description.
13
- */
14
- export declare class Logger {
15
- static defaultLevel: Level;
16
- static defaultName: string;
17
- static selfClass: typeof Logger;
18
- static instances: Mapping<Logger>;
19
- static runtimeVersion: number;
20
- /**
21
- * Configures all logger instances.
22
- * @param options - Options to set.
23
- */
24
- static configureAllInstances(options?: Partial<LoggerOptions>): void;
25
- level: Level;
26
- name: string;
27
- /**
28
- * Initializes logger.
29
- * @param options - Options to set.
30
- */
31
- constructor(options?: Partial<LoggerOptions>);
32
- /**
33
- * Configures logger.
34
- * @param options - Options to set.
35
- * @param options.name - Description of the logger instance.
36
- * @param options.level - Logging level to configure.
37
- */
38
- configure({ name, level }: Partial<LoggerOptions>): void;
39
- /**
40
- * Shows the given object's representation in the browsers console if
41
- * possible or in a standalone alert-window as fallback.
42
- * @param object - Any object to print.
43
- * @param force - If set to "true" given input will be shown independently
44
- * of current logging configuration or interpreter's console
45
- * implementation.
46
- * @param avoidAnnotation - If set to "true" given input has no module or
47
- * log level specific annotations.
48
- * @param level - Description of log messages importance.
49
- * @param additionalArguments - Additional values to print.
50
- */
51
- log(object: unknown, force?: boolean, avoidAnnotation?: boolean, level?: Level, ...additionalArguments: Array<unknown>): void;
52
- /**
53
- * Wrapper method for the native console method usually provided by
54
- * interpreter.
55
- * @param object - Any object to print.
56
- * @param additionalArguments - Additional arguments are used for string
57
- * formatting.
58
- */
59
- info(object: unknown, ...additionalArguments: Array<unknown>): void;
60
- /**
61
- * Wrapper method for the native console method usually provided by
62
- * interpreter.
63
- * @param object - Any object to print.
64
- * @param additionalArguments - Additional arguments are used for string
65
- * formatting.
66
- */
67
- debug(object: unknown, ...additionalArguments: Array<unknown>): void;
68
- /**
69
- * Wrapper method for the native console method usually provided by
70
- * interpreter.
71
- * @param object - Any object to print.
72
- * @param additionalArguments - Additional arguments are used for string
73
- * formatting.
74
- */
75
- error(object: unknown, ...additionalArguments: Array<unknown>): void;
76
- /**
77
- * Wrapper method for the native console method usually provided by
78
- * interpreter.
79
- * @param object - Any object to print.
80
- * @param additionalArguments - Additional arguments are used for string
81
- * formatting.
82
- */
83
- critical(object: unknown, ...additionalArguments: Array<unknown>): void;
84
- /**
85
- * Wrapper method for the native console method usually provided by
86
- * interpreter.
87
- * @param object - Any object to print.
88
- * @param additionalArguments - Additional arguments are used for string
89
- * formatting.
90
- */
91
- warn(object: unknown, ...additionalArguments: Array<unknown>): void;
92
- /**
93
- * Dumps a given object in a human-readable format.
94
- * @param object - Any object to show.
95
- * @param level - Number of levels to dig into given object recursively.
96
- * @param currentLevel - Maximal number of recursive function calls to
97
- * represent given object.
98
- * @returns Returns the serialized version of given object.
99
- */
100
- static show(object: unknown, level?: number, currentLevel?: number): string;
101
- }
102
- export default Logger;
@@ -1,29 +0,0 @@
1
- import type { AnyFunction } from './type';
2
- /**
3
- * Represents the semaphore state.
4
- * @property queue - List of waiting resource requests.
5
- * @property numberOfFreeResources - Number free allowed concurrent resource
6
- * uses.
7
- * @property numberOfResources - Number of allowed concurrent resource uses.
8
- */
9
- export declare class Semaphore {
10
- queue: Array<AnyFunction>;
11
- numberOfResources: number;
12
- numberOfFreeResources: number;
13
- /**
14
- * Initializes number of resources.
15
- * @param numberOfResources - Number of resources to manage.
16
- */
17
- constructor(numberOfResources?: number);
18
- /**
19
- * Acquires a new resource and runs given callback if available.
20
- * @returns A promise which will be resolved if requested resource is
21
- * available.
22
- */
23
- acquire(): Promise<number>;
24
- /**
25
- * Releases a resource and runs a waiting resolver if there exists some.
26
- */
27
- release(): void;
28
- }
29
- export default Semaphore;
package/dist/array.d.ts DELETED
@@ -1,150 +0,0 @@
1
- import type { Mapping, Page, PaginateOptions } from './type';
2
- /**
3
- * Summarizes given property of given item list.
4
- * @param data - Array of objects with given property name.
5
- * @param propertyName - Property name to summarize.
6
- * @param defaultValue - Value to return if property values doesn't match.
7
- * @returns Aggregated value.
8
- */
9
- export declare const aggregatePropertyIfEqual: <T = unknown>(data: Array<Mapping<unknown>>, propertyName: string, defaultValue?: T) => T;
10
- /**
11
- * Deletes every item witch has only empty attributes for given property names.
12
- * If given property names are empty each attribute will be considered. The
13
- * empty string, "null" and "undefined" will be interpreted as empty.
14
- * @param data - Data to filter.
15
- * @param propertyNames - Properties to consider.
16
- * @returns Given data without empty items.
17
- */
18
- export declare const deleteEmptyItems: <T extends Mapping<unknown> = Mapping<unknown>>(data: Array<T>, propertyNames?: Array<string | symbol>) => Array<T>;
19
- /**
20
- * Extracts all properties from all items which occur in given property names.
21
- * @param data - Data where each item should be sliced.
22
- * @param propertyNames - Property names to extract.
23
- * @returns Data with sliced items.
24
- */
25
- export declare const extract: <T = Mapping<unknown>>(data: unknown, propertyNames: Array<string>) => Array<T>;
26
- /**
27
- * Extracts all values which matches given regular expression.
28
- * @param data - Data to filter.
29
- * @param regularExpression - Pattern to match for.
30
- * @returns Filtered data.
31
- */
32
- export declare const extractIfMatches: (data: unknown, regularExpression: string | RegExp) => Array<string>;
33
- /**
34
- * Filters given data if given property is set or not.
35
- * @param data - Data to filter.
36
- * @param propertyName - Property name to check for existence.
37
- * @returns Given data without the items which doesn't have specified property.
38
- */
39
- export declare const extractIfPropertyExists: <T extends Mapping<unknown> = Mapping<unknown>>(data: unknown, propertyName: string) => Array<T>;
40
- /**
41
- * Extract given data where specified property value matches given patterns.
42
- * @param data - Data to filter.
43
- * @param propertyPattern - Mapping of property names to pattern.
44
- * @returns Filtered data.
45
- */
46
- export declare const extractIfPropertyMatches: <T = unknown>(data: unknown, propertyPattern: Mapping<RegExp | string>) => Array<T>;
47
- /**
48
- * Determines all objects which exists in "first" and in "second".
49
- * Object key which will be compared are given by "keys". If an empty array is
50
- * given each key will be compared. If an object is given corresponding initial
51
- * data key will be mapped to referenced new data key.
52
- * @param first - Referenced data to check for.
53
- * @param second - Data to check for existence.
54
- * @param keys - Keys to define equality.
55
- * @param strict - The strict parameter indicates whether "null" and
56
- * "undefined" should be interpreted as equal (takes only effect if given keys
57
- * aren't empty).
58
- * @returns Data which does exit in given initial data.
59
- */
60
- export declare const intersect: <T = unknown>(first: unknown, second: unknown, keys?: Array<string> | Mapping<number | string>, strict?: boolean) => Array<T>;
61
- /**
62
- * Converts given object into an array.
63
- * @param object - Target to convert.
64
- * @returns Generated array.
65
- */
66
- export declare const makeArray: <T = unknown>(object: unknown) => Array<T>;
67
- /**
68
- * Creates a list of items within given range.
69
- * @param range - Array of lower and upper bounds. If only one value is given
70
- * lower bound will be assumed to be zero. Both integers have to be positive
71
- * and will be contained in the resulting array. If more than two numbers are
72
- * provided given range will be returned.
73
- * @param step - Space between two consecutive values.
74
- * @param ignoreLastStep - Removes last step.
75
- * @returns Produced array of integers.
76
- */
77
- export declare const makeRange: (range: number | Array<number> | [number] | [number, number], step?: number, ignoreLastStep?: boolean) => Array<number>;
78
- /**
79
- * Merge the contents of two arrays together into the first array.
80
- * @param target - Target array.
81
- * @param source - Source array.
82
- * @returns Target array with merged given source one.
83
- */
84
- export declare const merge: <T = unknown>(target: Array<T>, source: Array<T>) => Array<T>;
85
- /**
86
- * Generates a list if pagination symbols to render a pagination from.
87
- * @param options - Configure bounds and current page of pagination to
88
- * determine.
89
- * @param options.boundaryCount - Indicates where to start pagination within
90
- * given total range.
91
- * @param options.disabled - Indicates whether to disable all items.
92
- * @param options.hideNextButton - Indicates whether to show a jump to next
93
- * item.
94
- * @param options.hidePrevButton - Indicates whether to show a jump to previous
95
- * item.
96
- * @param options.page - Indicates current visible page.
97
- * @param options.pageSize - Number of items per page.
98
- * @param options.showFirstButton - Indicates whether to show a jump to first
99
- * item.
100
- * @param options.showLastButton - Indicates whether to show a jump to last
101
- * item.
102
- * @param options.siblingCount - Number of sibling page symbols next to current
103
- * page symbol.
104
- * @param options.total - Number of all items to paginate.
105
- * @returns A list of pagination symbols.
106
- */
107
- export declare const paginate: (options?: Partial<PaginateOptions>) => Array<Page>;
108
- /**
109
- * Generates all permutations of given iterable.
110
- * @param data - Array like object.
111
- * @returns Array of permuted arrays.
112
- */
113
- export declare const permute: <T = unknown>(data: Array<T>) => Array<Array<T>>;
114
- /**
115
- * Generates all lengths permutations of given iterable.
116
- * @param data - Array like object.
117
- * @param minimalSubsetLength - Defines how long the minimal subset length
118
- * should be.
119
- * @returns Array of permuted arrays.
120
- */
121
- export declare const permuteLength: <T = unknown>(data: Array<T>, minimalSubsetLength?: number) => Array<Array<T>>;
122
- /**
123
- * Sums up given property of given item list.
124
- * @param data - The objects with specified property to sum up.
125
- * @param propertyName - Property name to sum up its value.
126
- * @returns The aggregated value.
127
- */
128
- export declare const sumUpProperty: (data: unknown, propertyName: string) => number;
129
- /**
130
- * Removes given target on given list.
131
- * @param list - Array to splice.
132
- * @param target - Target to remove from given list.
133
- * @param strict - Indicates whether to fire an exception if given target
134
- * doesn't exist given list.
135
- * @returns Item with the appended target.
136
- */
137
- export declare const removeArrayItem: <T = unknown>(list: Array<T>, target: T, strict?: boolean) => Array<T>;
138
- /**
139
- * Sorts given object of dependencies in a topological order.
140
- * @param items - Items to sort.
141
- * @returns Sorted array of given items respecting their dependencies.
142
- */
143
- export declare const sortTopological: (items: Mapping<Array<string> | string>) => Array<string>;
144
- /**
145
- * Makes all values in given iterable unique by removing duplicates (The first
146
- * occurrences will be left).
147
- * @param data - Array like object.
148
- * @returns Sliced version of given object.
149
- */
150
- export declare const unique: <T = unknown>(data: Array<T>) => Array<T>;