clientnode 4.0.1442 → 4.0.1443
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 +69 -83
- package/dist/Logger.js +756 -163
- package/dist/Semaphore.js +56 -46
- package/dist/array.js +661 -337
- package/dist/bundle/Lock.js +86 -0
- package/dist/bundle/Logger.js +778 -0
- package/dist/bundle/Semaphore.js +75 -0
- package/dist/bundle/array.js +776 -0
- package/dist/bundle/cli.js +59 -0
- package/dist/bundle/constants.js +214 -0
- package/dist/bundle/context.js +280 -0
- package/dist/bundle/cookie.js +301 -0
- package/dist/bundle/data-transfer.js +825 -0
- package/dist/bundle/datetime.js +1148 -0
- package/dist/bundle/domNode.js +549 -0
- package/dist/bundle/expression/evaluators.js +1228 -0
- package/dist/bundle/expression/helper.js +117 -0
- package/dist/bundle/expression/index.js +1357 -0
- package/dist/bundle/expression/indicator-functions.js +332 -0
- package/dist/bundle/expression/type.js +16 -0
- package/dist/bundle/filesystem.js +436 -0
- package/dist/bundle/function.js +117 -0
- package/dist/bundle/index.js +3249 -0
- package/dist/bundle/indicators.js +565 -0
- package/dist/bundle/module.js +213 -0
- package/dist/bundle/number.js +527 -0
- package/dist/bundle/object.js +1104 -0
- package/dist/bundle/process.js +291 -0
- package/dist/bundle/property-types.js +36 -0
- package/dist/bundle/scope.js +2121 -0
- package/dist/bundle/string.js +1213 -0
- package/dist/bundle/test-helper.js +802 -0
- package/dist/bundle/type.js +16 -0
- package/dist/bundle/utility.js +420 -0
- package/dist/cli.js +45 -37
- package/dist/compatible/Lock.js +86 -0
- package/dist/compatible/Logger.js +778 -0
- package/dist/compatible/Semaphore.js +75 -0
- package/dist/compatible/array.js +776 -0
- package/dist/compatible/cli.js +59 -0
- package/dist/compatible/constants.js +214 -0
- package/dist/compatible/context.js +280 -0
- package/dist/compatible/cookie.js +301 -0
- package/dist/compatible/data-transfer.js +825 -0
- package/dist/compatible/datetime.js +1148 -0
- package/dist/compatible/domNode.js +549 -0
- package/dist/compatible/expression/evaluators.js +1228 -0
- package/dist/compatible/expression/helper.js +117 -0
- package/dist/compatible/expression/index.js +1357 -0
- package/dist/compatible/expression/indicator-functions.js +332 -0
- package/dist/compatible/expression/type.js +16 -0
- package/dist/compatible/filesystem.js +436 -0
- package/dist/compatible/function.js +117 -0
- package/dist/compatible/index.js +3249 -0
- package/dist/compatible/indicators.js +565 -0
- package/dist/compatible/module.js +213 -0
- package/dist/compatible/number.js +527 -0
- package/dist/compatible/object.js +1104 -0
- package/dist/compatible/process.js +291 -0
- package/dist/compatible/property-types.js +36 -0
- package/dist/compatible/scope.js +2121 -0
- package/dist/compatible/string.js +1213 -0
- package/dist/compatible/test-helper.js +802 -0
- package/dist/compatible/type.js +16 -0
- package/dist/compatible/utility.js +420 -0
- package/dist/constants.js +198 -110
- package/dist/context.js +265 -25
- package/dist/cookie.js +265 -48
- package/dist/data-transfer.js +775 -166
- package/dist/datetime.js +1107 -241
- package/dist/domNode.js +495 -277
- package/dist/expression/evaluators.js +1189 -234
- package/dist/expression/helper.js +102 -82
- package/dist/expression/index.js +1341 -10
- package/dist/expression/indicator-functions.js +316 -21
- package/dist/expression/type.js +1 -5
- package/dist/filesystem.js +349 -323
- package/dist/function.js +93 -51
- package/dist/index.js +3232 -26
- package/dist/indicators.js +512 -68
- package/dist/module.js +197 -99
- package/dist/number.js +491 -25
- package/dist/object.js +917 -775
- package/dist/process.js +261 -38
- package/dist/property-types.js +17 -96
- package/dist/scope.js +2092 -56
- package/dist/string.js +991 -603
- package/dist/test-helper.js +633 -171
- package/dist/type.js +4 -9
- package/dist/utility.js +372 -91
- package/package.json +2 -2
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
if(typeof window==='undefined'||window===null)var window=(typeof global==='undefined'||global===null)?{}:global;/******/ // The require scope
|
|
2
|
+
/******/ var __webpack_require__ = {};
|
|
3
|
+
/******/
|
|
4
|
+
/************************************************************************/
|
|
5
|
+
/******/ /* webpack/runtime/define property getters */
|
|
6
|
+
/******/ !function() {
|
|
7
|
+
/******/ // define getter/value functions for harmony exports
|
|
8
|
+
/******/ __webpack_require__.d = function(exports, definition) {
|
|
9
|
+
/******/ if(Array.isArray(definition)) {
|
|
10
|
+
/******/ var i = 0;
|
|
11
|
+
/******/ while(i < definition.length) {
|
|
12
|
+
/******/ var key = definition[i++];
|
|
13
|
+
/******/ var binding = definition[i++];
|
|
14
|
+
/******/ if(!__webpack_require__.o(exports, key)) {
|
|
15
|
+
/******/ if(binding === 0) {
|
|
16
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
|
|
17
|
+
/******/ } else {
|
|
18
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
|
|
19
|
+
/******/ }
|
|
20
|
+
/******/ } else if(binding === 0) { i++; }
|
|
21
|
+
/******/ }
|
|
22
|
+
/******/ } else {
|
|
23
|
+
/******/ for(var key in definition) {
|
|
24
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
25
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
26
|
+
/******/ }
|
|
27
|
+
/******/ }
|
|
28
|
+
/******/ }
|
|
29
|
+
/******/ };
|
|
30
|
+
/******/ }();
|
|
31
|
+
/******/
|
|
32
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
33
|
+
/******/ !function() {
|
|
34
|
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
35
|
+
/******/ }();
|
|
36
|
+
/******/
|
|
37
|
+
/************************************************************************/
|
|
38
|
+
var __webpack_exports__ = {};
|
|
39
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
40
|
+
/* harmony export */ j: function() { return /* binding */ Semaphore; }
|
|
41
|
+
/* harmony export */ });
|
|
42
|
+
// #!/usr/bin/env babel-node
|
|
43
|
+
// -*- coding: utf-8 -*-
|
|
44
|
+
/** @module Semaphore *//* !
|
|
45
|
+
region header
|
|
46
|
+
[Project page](https://torben.website/clientnode)
|
|
47
|
+
|
|
48
|
+
Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
|
|
49
|
+
|
|
50
|
+
License
|
|
51
|
+
-------
|
|
52
|
+
|
|
53
|
+
This library written by Torben Sickert stands under a creative commons
|
|
54
|
+
naming 3.0 unported license.
|
|
55
|
+
See https://creativecommons.org/licenses/by/3.0/deed.de
|
|
56
|
+
endregion
|
|
57
|
+
*/function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}/**
|
|
58
|
+
* Represents the semaphore state.
|
|
59
|
+
* @property queue - List of waiting resource requests.
|
|
60
|
+
* @property numberOfFreeResources - Number free allowed concurrent resource
|
|
61
|
+
* uses.
|
|
62
|
+
* @property numberOfResources - Number of allowed concurrent resource uses.
|
|
63
|
+
*/var Semaphore=/*#__PURE__*/function(){/**
|
|
64
|
+
* Initializes number of resources.
|
|
65
|
+
* @param numberOfResources - Number of resources to manage.
|
|
66
|
+
*/function Semaphore(numberOfResources){if(numberOfResources===void 0){numberOfResources=2}_classCallCheck(this,Semaphore);_defineProperty(this,"queue",[]);_defineProperty(this,"numberOfResources",void 0);_defineProperty(this,"numberOfFreeResources",void 0);this.numberOfResources=numberOfResources;this.numberOfFreeResources=numberOfResources}/**
|
|
67
|
+
* Acquires a new resource and runs given callback if available.
|
|
68
|
+
* @returns A promise which will be resolved if requested resource is
|
|
69
|
+
* available.
|
|
70
|
+
*/return _createClass(Semaphore,[{key:"acquire",value:function acquire(){var _this=this;return new Promise(function(resolve){if(_this.numberOfFreeResources<=0)_this.queue.push(resolve);else{_this.numberOfFreeResources-=1;resolve(_this.numberOfFreeResources)}})}/**
|
|
71
|
+
* Releases a resource and runs a waiting resolver if there exists some.
|
|
72
|
+
*/},{key:"release",value:function release(){var callback=this.queue.shift();if(callback===undefined)this.numberOfFreeResources+=1;else callback(this.numberOfFreeResources)}}])}();/* harmony default export */ __webpack_exports__.A = (Semaphore);
|
|
73
|
+
var __webpack_exports__Semaphore = __webpack_exports__.j;
|
|
74
|
+
var __webpack_exports__default = __webpack_exports__.A;
|
|
75
|
+
export { __webpack_exports__Semaphore as Semaphore, __webpack_exports__default as default };
|