clientnode 4.0.1436 → 4.0.1438

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 (142) hide show
  1. package/dist/Lock.js +83 -94
  2. package/dist/Logger.js +163 -715
  3. package/dist/Semaphore.js +46 -81
  4. package/dist/array.js +337 -568
  5. package/dist/cli.js +37 -71
  6. package/dist/constants.js +110 -209
  7. package/dist/context.js +25 -229
  8. package/dist/cookie.js +48 -226
  9. package/dist/data-transfer.js +166 -725
  10. package/dist/datetime.js +241 -1059
  11. package/dist/domNode.js +277 -441
  12. package/dist/expression/evaluators.js +234 -1112
  13. package/dist/expression/helper.js +82 -135
  14. package/dist/expression/index.js +10 -1245
  15. package/dist/expression/indicator-functions.js +21 -239
  16. package/dist/expression/type.js +4 -34
  17. package/dist/filesystem.js +323 -309
  18. package/dist/function.js +51 -125
  19. package/dist/index.js +26 -2709
  20. package/dist/indicators.js +68 -440
  21. package/dist/module.js +98 -163
  22. package/dist/number.js +25 -423
  23. package/dist/object.js +774 -852
  24. package/dist/process.js +38 -245
  25. package/dist/property-types.js +96 -157
  26. package/dist/scope.js +56 -1825
  27. package/dist/string.js +603 -909
  28. package/dist/test-helper.js +171 -541
  29. package/dist/type.js +8 -37
  30. package/dist/utility.js +91 -336
  31. package/package.json +9 -10
  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/Lock.js +0 -111
  37. package/dist/bundle/Logger.js +0 -705
  38. package/dist/bundle/Semaphore.js +0 -100
  39. package/dist/bundle/array.js +0 -648
  40. package/dist/bundle/cli.js +0 -85
  41. package/dist/bundle/constants.js +0 -225
  42. package/dist/bundle/context.js +0 -243
  43. package/dist/bundle/cookie.js +0 -262
  44. package/dist/bundle/data-transfer.js +0 -741
  45. package/dist/bundle/datetime.js +0 -1064
  46. package/dist/bundle/domNode.js +0 -471
  47. package/dist/bundle/expression/evaluators.js +0 -1115
  48. package/dist/bundle/expression/helper.js +0 -106
  49. package/dist/bundle/expression/index.js +0 -1223
  50. package/dist/bundle/expression/indicator-functions.js +0 -235
  51. package/dist/bundle/expression/type.js +0 -50
  52. package/dist/bundle/filesystem.js +0 -374
  53. package/dist/bundle/function.js +0 -105
  54. package/dist/bundle/index.js +0 -2686
  55. package/dist/bundle/indicators.js +0 -459
  56. package/dist/bundle/module.js +0 -180
  57. package/dist/bundle/number.js +0 -425
  58. package/dist/bundle/object.js +0 -1004
  59. package/dist/bundle/process.js +0 -275
  60. package/dist/bundle/property-types.js +0 -167
  61. package/dist/bundle/scope.js +0 -1808
  62. package/dist/bundle/string.js +0 -1095
  63. package/dist/bundle/test-helper.js +0 -690
  64. package/dist/bundle/type.js +0 -50
  65. package/dist/bundle/utility.js +0 -362
  66. package/dist/cli.d.ts +0 -31
  67. package/dist/compatible/Lock.js +0 -111
  68. package/dist/compatible/Logger.js +0 -705
  69. package/dist/compatible/Semaphore.js +0 -100
  70. package/dist/compatible/array.js +0 -648
  71. package/dist/compatible/cli.js +0 -85
  72. package/dist/compatible/constants.js +0 -225
  73. package/dist/compatible/context.js +0 -243
  74. package/dist/compatible/cookie.js +0 -262
  75. package/dist/compatible/data-transfer.js +0 -741
  76. package/dist/compatible/datetime.js +0 -1064
  77. package/dist/compatible/domNode.js +0 -471
  78. package/dist/compatible/expression/evaluators.js +0 -1115
  79. package/dist/compatible/expression/helper.js +0 -106
  80. package/dist/compatible/expression/index.js +0 -1223
  81. package/dist/compatible/expression/indicator-functions.js +0 -235
  82. package/dist/compatible/expression/type.js +0 -50
  83. package/dist/compatible/filesystem.js +0 -374
  84. package/dist/compatible/function.js +0 -105
  85. package/dist/compatible/index.js +0 -2686
  86. package/dist/compatible/indicators.js +0 -459
  87. package/dist/compatible/module.js +0 -180
  88. package/dist/compatible/number.js +0 -425
  89. package/dist/compatible/object.js +0 -1004
  90. package/dist/compatible/process.js +0 -275
  91. package/dist/compatible/property-types.js +0 -167
  92. package/dist/compatible/scope.js +0 -1808
  93. package/dist/compatible/string.js +0 -1095
  94. package/dist/compatible/test-helper.js +0 -690
  95. package/dist/compatible/type.js +0 -50
  96. package/dist/compatible/utility.js +0 -362
  97. package/dist/constants.d.ts +0 -99
  98. package/dist/context.d.ts +0 -8
  99. package/dist/cookie.d.ts +0 -31
  100. package/dist/data-transfer.d.ts +0 -45
  101. package/dist/datetime.d.ts +0 -37
  102. package/dist/domNode.d.ts +0 -82
  103. package/dist/expression/evaluators.d.ts +0 -55
  104. package/dist/expression/helper.d.ts +0 -4
  105. package/dist/expression/index.d.ts +0 -7
  106. package/dist/expression/indicator-functions.d.ts +0 -14
  107. package/dist/expression/type.d.ts +0 -70
  108. package/dist/filesystem.d.ts +0 -143
  109. package/dist/function.d.ts +0 -20
  110. package/dist/index.d.ts +0 -23
  111. package/dist/indicators.d.ts +0 -68
  112. package/dist/module.d.ts +0 -8
  113. package/dist/number.d.ts +0 -35
  114. package/dist/object.d.ts +0 -231
  115. package/dist/process.d.ts +0 -22
  116. package/dist/property-types.d.ts +0 -460
  117. package/dist/scope.d.ts +0 -44
  118. package/dist/string.d.ts +0 -312
  119. package/dist/test/Lock.d.ts +0 -1
  120. package/dist/test/Logger.d.ts +0 -1
  121. package/dist/test/Semaphore.d.ts +0 -1
  122. package/dist/test/array.d.ts +0 -1
  123. package/dist/test/cookie.d.ts +0 -1
  124. package/dist/test/data-transfer.d.ts +0 -1
  125. package/dist/test/datetime.d.ts +0 -1
  126. package/dist/test/domNode.d.ts +0 -1
  127. package/dist/test/expression/evaluators.d.ts +0 -1
  128. package/dist/test/expression/helper.d.ts +0 -1
  129. package/dist/test/expression/indicator-functions.d.ts +0 -1
  130. package/dist/test/filesystem.d.ts +0 -1
  131. package/dist/test/function.d.ts +0 -1
  132. package/dist/test/indicators.d.ts +0 -1
  133. package/dist/test/number.d.ts +0 -1
  134. package/dist/test/object.d.ts +0 -1
  135. package/dist/test/process.d.ts +0 -1
  136. package/dist/test/property-types.d.ts +0 -1
  137. package/dist/test/scope.d.ts +0 -1
  138. package/dist/test/string.d.ts +0 -1
  139. package/dist/test/utility.d.ts +0 -1
  140. package/dist/test-helper.d.ts +0 -143
  141. package/dist/type.d.ts +0 -230
  142. package/dist/utility.d.ts +0 -44
package/dist/function.js CHANGED
@@ -1,117 +1,9 @@
1
- 'use strict';if(typeof module!=='undefined'&&module!==null&&eval('typeof require')!=='undefined'&&eval('require')!==null&&'main'in eval('require')&&eval('typeof require.main')!=='undefined'&&eval('require.main')!==null){var ORIGINAL_MAIN_MODULE=module;if(module!==eval('require.main')&&'paths'in module&&'paths'in eval('require.main')&&typeof __dirname!=='undefined'&&__dirname!==null)module.paths=eval('require.main.paths').concat(module.paths.filter(function(path){return eval('require.main.paths').includes(path)}))};if(typeof window==='undefined'||window===null)var window=(typeof global==='undefined'||global===null)?{}:global;(function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("core-js/modules/es.array.includes.js"));
4
- else if(typeof define === 'function' && define.amd)
5
- define(["core-js/modules/es.array.includes.js"], factory);
6
- else {
7
- var a = typeof exports === 'object' ? factory(require("core-js/modules/es.array.includes.js")) : factory(root["core-js/modules/es.array.includes.js"]);
8
- for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
- }
10
- })(this, function(__WEBPACK_EXTERNAL_MODULE__0__) {
11
- return /******/ (function() { // webpackBootstrap
12
- /******/ "use strict";
13
- /******/ var __webpack_modules__ = ([
14
- /* 0 */
15
- /***/ (function(module) {
16
-
17
- module.exports = __WEBPACK_EXTERNAL_MODULE__0__;
18
-
19
- /***/ })
20
- /******/ ]);
21
- /************************************************************************/
22
- /******/ // The module cache
23
- /******/ var __webpack_module_cache__ = {};
24
- /******/
25
- /******/ // The require function
26
- /******/ function __webpack_require__(moduleId) {
27
- /******/ // Check if module is in cache
28
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
29
- /******/ if (cachedModule !== undefined) {
30
- /******/ return cachedModule.exports;
31
- /******/ }
32
- /******/ // Create a new module (and put it into the cache)
33
- /******/ var module = __webpack_module_cache__[moduleId] = {
34
- /******/ // no module.id needed
35
- /******/ // no module.loaded needed
36
- /******/ exports: {}
37
- /******/ };
38
- /******/
39
- /******/ // Execute the module function
40
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
41
- /******/
42
- /******/ // Return the exports of the module
43
- /******/ return module.exports;
44
- /******/ }
45
- /******/
46
- /************************************************************************/
47
- /******/ /* webpack/runtime/compat get default export */
48
- /******/ !function() {
49
- /******/ // getDefaultExport function for compatibility with non-harmony modules
50
- /******/ __webpack_require__.n = function(module) {
51
- /******/ var getter = module && module.__esModule ?
52
- /******/ function() { return module['default']; } :
53
- /******/ function() { return module; };
54
- /******/ __webpack_require__.d(getter, { a: getter });
55
- /******/ return getter;
56
- /******/ };
57
- /******/ }();
58
- /******/
59
- /******/ /* webpack/runtime/define property getters */
60
- /******/ !function() {
61
- /******/ // define getter/value functions for harmony exports
62
- /******/ __webpack_require__.d = function(exports, definition) {
63
- /******/ if(Array.isArray(definition)) {
64
- /******/ var i = 0;
65
- /******/ while(i < definition.length) {
66
- /******/ var key = definition[i++];
67
- /******/ var binding = definition[i++];
68
- /******/ if(!__webpack_require__.o(exports, key)) {
69
- /******/ if(binding === 0) {
70
- /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
71
- /******/ } else {
72
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
73
- /******/ }
74
- /******/ } else if(binding === 0) { i++; }
75
- /******/ }
76
- /******/ } else {
77
- /******/ for(var key in definition) {
78
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
79
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
80
- /******/ }
81
- /******/ }
82
- /******/ }
83
- /******/ };
84
- /******/ }();
85
- /******/
86
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
87
- /******/ !function() {
88
- /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
89
- /******/ }();
90
- /******/
91
- /******/ /* webpack/runtime/make namespace object */
92
- /******/ !function() {
93
- /******/ // define __esModule on exports
94
- /******/ __webpack_require__.r = function(exports) {
95
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
96
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
97
- /******/ }
98
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
99
- /******/ };
100
- /******/ }();
101
- /******/
102
- /************************************************************************/
103
- var __webpack_exports__ = {};
104
- __webpack_require__.r(__webpack_exports__);
105
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
106
- /* harmony export */ getParameterNames: function() { return /* binding */ _getParameterNames; },
107
- /* harmony export */ identity: function() { return /* binding */ identity; },
108
- /* harmony export */ invertArrayFilter: function() { return /* binding */ invertArrayFilter; }
109
- /* harmony export */ });
110
- /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
111
- /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__);
112
1
  // #!/usr/bin/env babel-node
113
2
  // -*- coding: utf-8 -*-
114
- /** @module function *//* !
3
+ /** @module function */
4
+ 'use strict';
5
+
6
+ /* !
115
7
  region header
116
8
  [Project page](https://torben.website/clientnode)
117
9
 
@@ -124,26 +16,60 @@ __webpack_require__.r(__webpack_exports__);
124
16
  naming 3.0 unported license.
125
17
  See https://creativecommons.org/licenses/by/3.0/deed.de
126
18
  endregion
127
- */function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}/**
19
+ */
20
+ import "core-js/modules/es.array.includes.js";
21
+ import "core-js/modules/es.array.push.js";
22
+ /**
128
23
  * Determines all parameter names from given callable (function or class,
129
24
  * ...).
130
25
  * @param callable - Function or function code to inspect.
131
26
  * @returns List of parameter names.
132
- */var _getParameterNames=function getParameterNames(callable){var functionCode=(typeof callable==="string"?callable:// Strip comments.
133
- callable.toString()).replace(/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,"");if(functionCode.startsWith("class"))return _getParameterNames("function "+functionCode.replace(/.*(constructor\([^)]+\))/m,"$1"));// Try classic function declaration.
134
- var parameter=/^function\s*[^(]*\(\s*([^)]*)\)/m.exec(functionCode);if(parameter===null)// Try arrow function declaration.
135
- parameter=/^[^(]*\(\s*([^)]*)\) *=>.*/m.exec(functionCode);if(parameter===null)// Try one argument and without brackets arrow function declaration.
136
- parameter=/([^= ]+) *=>.*/m.exec(functionCode);var names=[];if(parameter&&parameter.length>1&&parameter[1].trim().length){var _iterator=_createForOfIteratorHelper(parameter[1].split(",")),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;)// Remove default parameter values.
137
- {var name=_step.value;names.push(name.replace(/=.+$/g,"").trim())}}catch(err){_iterator.e(err)}finally{_iterator.f()}return names}return names};/**
27
+ */
28
+ export const getParameterNames = callable => {
29
+ const functionCode = (typeof callable === 'string' ? callable :
30
+ // Strip comments.
31
+ callable.toString()).replace(/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg, '');
32
+ if (functionCode.startsWith('class')) return getParameterNames('function ' + functionCode.replace(/.*(constructor\([^)]+\))/m, '$1'));
33
+
34
+ // Try classic function declaration.
35
+ let parameter = /^function\s*[^(]*\(\s*([^)]*)\)/m.exec(functionCode);
36
+ if (parameter === null)
37
+ // Try arrow function declaration.
38
+ parameter = /^[^(]*\(\s*([^)]*)\) *=>.*/m.exec(functionCode);
39
+ if (parameter === null)
40
+ // Try one argument and without brackets arrow function declaration.
41
+ parameter = /([^= ]+) *=>.*/m.exec(functionCode);
42
+ const names = [];
43
+ if (parameter && parameter.length > 1 && parameter[1].trim().length) {
44
+ for (const name of parameter[1].split(','))
45
+ // Remove default parameter values.
46
+ names.push(name.replace(/=.+$/g, '').trim());
47
+ return names;
48
+ }
49
+ return names;
50
+ };
51
+ /**
138
52
  * Implements the identity function.
139
53
  * @param value - A value to return.
140
54
  * @returns Returns the given value.
141
- */var identity=function identity(value){return value};/**
55
+ */
56
+ export const identity = value => value;
57
+ /**
142
58
  * Inverted filter helper to inverse each given filter.
143
59
  * @param filter - A function that filters an array.
144
60
  * @returns The inverted filter.
145
- */var invertArrayFilter=function invertArrayFilter(filter){return function(data){if(Array.isArray(data)){for(var _len=arguments.length,additionalParameter=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){additionalParameter[_key-1]=arguments[_key]}var filteredData=filter.apply(void 0,[data].concat(additionalParameter));var result=[];if(filteredData.length){var _iterator2=_createForOfIteratorHelper(data),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var date=_step2.value;if(!filteredData.includes(date))result.push(date)}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}}else result=data;return result}return data}};
146
- /******/ return __webpack_exports__;
147
- /******/ })()
148
- ;
149
- });
61
+ */
62
+ export const invertArrayFilter = filter => {
63
+ return (data, ...additionalParameter) => {
64
+ if (Array.isArray(data)) {
65
+ const filteredData = filter(data, ...additionalParameter);
66
+ let result = [];
67
+ if (filteredData.length) {
68
+ for (const date of data) if (!filteredData.includes(date)) result.push(date);
69
+ } else result = data;
70
+ return result;
71
+ }
72
+ return data;
73
+ };
74
+ };
75
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vc3JjL2Z1bmN0aW9uLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vICMhL3Vzci9iaW4vZW52IGJhYmVsLW5vZGVcbi8vIC0qLSBjb2Rpbmc6IHV0Zi04IC0qLVxuLyoqIEBtb2R1bGUgZnVuY3Rpb24gKi9cbid1c2Ugc3RyaWN0J1xuLyogIVxuICAgIHJlZ2lvbiBoZWFkZXJcbiAgICBbUHJvamVjdCBwYWdlXShodHRwczovL3RvcmJlbi53ZWJzaXRlL2NsaWVudG5vZGUpXG5cbiAgICBDb3B5cmlnaHQgVG9yYmVuIFNpY2tlcnQgKGluZm9bXCJ+YXR+XCJddG9yYmVuLndlYnNpdGUpIDE2LjEyLjIwMTJcblxuICAgIExpY2Vuc2VcbiAgICAtLS0tLS0tXG5cbiAgICBUaGlzIGxpYnJhcnkgd3JpdHRlbiBieSBUb3JiZW4gU2lja2VydCBzdGFuZHMgdW5kZXIgYSBjcmVhdGl2ZSBjb21tb25zXG4gICAgbmFtaW5nIDMuMCB1bnBvcnRlZCBsaWNlbnNlLlxuICAgIFNlZSBodHRwczovL2NyZWF0aXZlY29tbW9ucy5vcmcvbGljZW5zZXMvYnkvMy4wL2RlZWQuZGVcbiAgICBlbmRyZWdpb25cbiovXG5pbXBvcnQgdHlwZSB7QW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