From fe9cfded2592156009035c8c8740e107d918155e Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Mon, 28 Jun 2021 21:21:41 +0000 Subject: [PATCH] Monster/ci/6f90be11 a84e 4782 9cec 2afc05fbef98 --- .gitlab-ci.yml | 27 ++++-- .gitlab/merge_request_templates/Bugfix.md | 2 +- .../merge_request_templates/Enhancement.md | 2 +- .gitlab/merge_request_templates/Feature.md | 2 +- Makefile | 3 +- README.md | 3 +- docs/Monster_Math.html | 4 +- docs/Monster_Types.ID.html | 4 +- docs/Monster_Types.Object.html | 4 +- docs/Monster_Types.Observer.html | 4 +- docs/Monster_Types.ObserverList.html | 4 +- docs/Monster_Types.Version.html | 4 +- docs/Monster_Types.html | 48 +++++----- docs/Monster_Util.html | 8 +- docs/global.html#Monster | 6 +- docs/index.html | 19 +++- docs/math_random.js.html | 4 +- docs/namespace.js.html | 2 +- docs/types_id.js.html | 4 +- docs/types_is.js.html | 24 ++--- docs/types_object.js.html | 4 +- docs/types_observer.js.html | 4 +- docs/types_observerlist.js.html | 4 +- docs/types_validate.js.html | 24 ++--- docs/types_version.js.html | 10 +-- docs/util_clone.js.html | 4 +- docs/util_freeze.js.html | 4 +- packages/monster/CHANGELOG | 12 +++ packages/monster/README.md | 6 +- .../monster/dist/modules/math/namespace.js | 2 +- packages/monster/dist/modules/math/random.js | 2 +- packages/monster/dist/modules/monster.js | 2 +- packages/monster/dist/modules/namespace.js | 2 +- packages/monster/dist/modules/types/id.js | 2 +- packages/monster/dist/modules/types/is.js | 2 +- .../monster/dist/modules/types/namespace.js | 2 +- packages/monster/dist/modules/types/object.js | 2 +- .../monster/dist/modules/types/observer.js | 2 +- .../dist/modules/types/observerlist.js | 2 +- .../monster/dist/modules/types/validate.js | 2 +- .../monster/dist/modules/types/version.js | 4 +- packages/monster/dist/modules/util/clone.js | 2 +- packages/monster/dist/modules/util/freeze.js | 2 +- .../monster/dist/modules/util/namespace.js | 2 +- packages/monster/dist/monster.dev.js | 88 +++++++++---------- packages/monster/dist/monster.dev.js.map | 24 ++--- packages/monster/dist/monster.js | 4 +- packages/monster/package.json | 2 +- packages/monster/source/math/random.js | 4 +- packages/monster/source/namespace.js | 2 +- packages/monster/source/types/id.js | 4 +- packages/monster/source/types/is.js | 24 ++--- packages/monster/source/types/object.js | 4 +- packages/monster/source/types/observer.js | 4 +- packages/monster/source/types/observerlist.js | 4 +- packages/monster/source/types/validate.js | 24 ++--- packages/monster/source/types/version.js | 10 +-- packages/monster/source/util/clone.js | 4 +- packages/monster/source/util/freeze.js | 4 +- packages/monster/test/cases/monster.js | 2 +- 60 files changed, 263 insertions(+), 227 deletions(-) create mode 100644 packages/monster/CHANGELOG diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8ead6bfb..62e9d6231 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,11 +1,24 @@ -# You can override the included template(s) by including variable overrides -# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings -# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings -# Note that environment variables can be set in several places -# See https://docs.gitlab.com/ee/ci/variables/#priority-of-environment-variables +image: node:latest + + +cache: + paths: + - node_modules/ + stages: -- test + - setup + - test sast: stage: test + + +test: + stage: test + script: + - apt update && apt install -y jq + - make test + + include: -- template: Security/SAST.gitlab-ci.yml + - template: Security/SAST.gitlab-ci.yml + diff --git a/.gitlab/merge_request_templates/Bugfix.md b/.gitlab/merge_request_templates/Bugfix.md index 555cd8199..7c6d9bfe2 100644 --- a/.gitlab/merge_request_templates/Bugfix.md +++ b/.gitlab/merge_request_templates/Bugfix.md @@ -13,7 +13,7 @@ ## Author's checklist (required) -- [ ] **In the "References" section above, link to at least one issue, ticket or process. +- [ ] **In the "References" section above**, link to at least one issue, ticket or process. - [ ] Confirm that your merge request contains an appropriate test case. - [ ] Confirm that you have followed the [Code Style Guide](https://about.schukai.com/de/intern/handbuch/referenzen/best-practices-code-styleguide/). - [ ] Confirm that you have followed the [Documentation Style Guide](https://about.schukai.com/de/intern/handbuch/leitfaden/uebersicht/). diff --git a/.gitlab/merge_request_templates/Enhancement.md b/.gitlab/merge_request_templates/Enhancement.md index 9ed68104e..7a426604b 100644 --- a/.gitlab/merge_request_templates/Enhancement.md +++ b/.gitlab/merge_request_templates/Enhancement.md @@ -13,7 +13,7 @@ ## Author's checklist (required) -- [ ] **In the "References" section above, link to at least one issue, ticket or process. +- [ ] **In the "References" section above**, link to at least one issue, ticket or process. - [ ] Confirm that your merge request contains an appropriate test case. - [ ] Confirm that you have followed the [Code Style Guide](https://about.schukai.com/de/intern/handbuch/referenzen/best-practices-code-styleguide/). - [ ] Confirm that you have documented the change. diff --git a/.gitlab/merge_request_templates/Feature.md b/.gitlab/merge_request_templates/Feature.md index 54b711365..bc5697b60 100644 --- a/.gitlab/merge_request_templates/Feature.md +++ b/.gitlab/merge_request_templates/Feature.md @@ -13,7 +13,7 @@ ## Author's checklist (required) -- [ ] **In the "References" section above, link to at least one issue, ticket or process. +- [ ] **In the "References" section above**, link to at least one issue, ticket or process. - [ ] Confirm that your merge request contains an appropriate test case. - [ ] Confirm that you have followed the [Code Style Guide](https://about.schukai.com/de/intern/handbuch/referenzen/best-practices-code-styleguide/). - [ ] Confirm that you have documented the function. diff --git a/Makefile b/Makefile index d4201a137..291cd0a98 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,6 @@ SHELL = bash # path and binaries AWK := awk -PHP := php CP := cp CD := cd KILL := /bin/kill @@ -79,7 +78,7 @@ GREP := grep NPM := npm # Executable Programs the Installed be have to -EXECUTABLES = $(AWK) $(CP) $(KILL) $(M4) $(MV) rm mkdir $(PHP) $(SED) $(SORT) $(TOUCH) $(WGET) $(CHMOD) $(NPX) $(FIND) $(XARGS) $(GREP) $(NPM) +EXECUTABLES = $(AWK) $(CP) $(KILL) $(M4) $(MV) rm mkdir $(SED) $(SORT) $(TOUCH) $(WGET) $(CHMOD) $(NPX) $(FIND) $(XARGS) $(GREP) $(NPM) K := $(foreach exec,$(EXECUTABLES),\ $(if $(shell which $(exec)),some string,$(error "Missing $(exec) in PATH; please install"))) diff --git a/README.md b/README.md index 3029c1207..a44420b69 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,5 @@ Please make sure to read the Issue Reporting Checklist before opening an issue. ## Changelog -Detailed changes for each release are documented in -the [release notes](https://gitlab.schukai.com/oss/libraries/javascript/monster/-/releases). +Detailed changes for each release are documented in the corresponding CHANGELOG file. diff --git a/docs/Monster_Math.html b/docs/Monster_Math.html index 0de31d3af..c52e13c1e 100644 --- a/docs/Monster_Math.html +++ b/docs/Monster_Math.html @@ -202,13 +202,13 @@ <p>this function uses crypt and returns a random number.</p> <p>you can call the method via the monster namespace <code>Monster.Math.random()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/math/random.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/math/random.js'; console.log(Monster.Math.random(1,10)) // ↦ 5 </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/math/random.js'; +import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/math/random.js'; console.log(random(1,10)) // ↦ 5 </script> </code></pre> diff --git a/docs/Monster_Types.ID.html b/docs/Monster_Types.ID.html index 8013f4455..aaaa9e605 100644 --- a/docs/Monster_Types.ID.html +++ b/docs/Monster_Types.ID.html @@ -57,14 +57,14 @@ <div class="class-description usertext"><p>you can call the method via the monster namespace <code>new Monster.Types.ID()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/id.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/id.js'; console.log(new Monster.Types.ID()) console.log(new Monster.Types.ID()) </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/id.js'; +import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/id.js'; console.log(new ID()) console.log(new ID()) </script> diff --git a/docs/Monster_Types.Object.html b/docs/Monster_Types.Object.html index 79d6f6f73..e06260783 100644 --- a/docs/Monster_Types.Object.html +++ b/docs/Monster_Types.Object.html @@ -58,14 +58,14 @@ <div class="class-description usertext"><p>This is the base class from which all monster classes are derived.</p> <p>you can call the method via the monster namespace <code>new Monster.Types.Object()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/object.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/object.js'; console.log(new Monster.Types.Object()) console.log(new Monster.Types.Object()) </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {Object} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/object.js'; +import {Object} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/object.js'; console.log(new Object()) console.log(new Object()) </script> diff --git a/docs/Monster_Types.Observer.html b/docs/Monster_Types.Observer.html index 6ac79fac0..8c049dcfa 100644 --- a/docs/Monster_Types.Observer.html +++ b/docs/Monster_Types.Observer.html @@ -58,14 +58,14 @@ <div class="class-description usertext"><p>an observer manages a callback function</p> <p>you can call the method via the monster namespace <code>new Monster.Types.Observer()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observer.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observer.js'; console.log(new Monster.Types.Observer()) console.log(new Monster.Types.Observer()) </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observer.js'; +import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observer.js'; console.log(Observer()) console.log(Observer()) </script> diff --git a/docs/Monster_Types.ObserverList.html b/docs/Monster_Types.ObserverList.html index 1bd8cbea5..fb1ec3e5c 100644 --- a/docs/Monster_Types.ObserverList.html +++ b/docs/Monster_Types.ObserverList.html @@ -58,14 +58,14 @@ <div class="class-description usertext"><p>With the help of the ObserverList class, observer can be managed.</p> <p>you can call the method via the monster namespace <code>new Monster.Types.ObserverList()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observerlist.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observerlist.js'; console.log(new Monster.Types.ObserverList()) console.log(new Monster.Types.ObserverList()) </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observerlist.js'; +import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observerlist.js'; console.log(ObserverList()) console.log(ObserverList()) </script> diff --git a/docs/Monster_Types.Version.html b/docs/Monster_Types.Version.html index 8dd42f5b9..0058c8575 100644 --- a/docs/Monster_Types.Version.html +++ b/docs/Monster_Types.Version.html @@ -58,14 +58,14 @@ <div class="class-description usertext"><p>the version object contains a sematic version number</p> <p>you can create the object via the monster namespace <code>new Monster.Types.Version()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3 console.log(new Monster.Types.Version('1')) // ↦ 1.0.0 </script> </code></pre> <p>Alternatively, you can also integrate this class individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; +import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; console.log(new Version('1.2.3')) // ↦ 1.2.3 console.log(new Version('1')) // ↦ 1.0.0 </script> diff --git a/docs/Monster_Types.html b/docs/Monster_Types.html index 1c37abb9a..bae735ec2 100644 --- a/docs/Monster_Types.html +++ b/docs/Monster_Types.html @@ -221,14 +221,14 @@ <p>checks whether the value passed is a array</p> <p>you can call the method via the monster namespace <code>Monster.Types.isArray()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; console.log(Monster.Types.isArray('2')) // ↦ false console.log(Monster.Types.isArray([])) // ↦ true </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; +import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; console.log(isArray('2')) // ↦ false console.log(isArray([])) // ↦ true </script> @@ -395,7 +395,7 @@ console.log(isArray([])) // ↦ true <p>checks whether the value passed is a boolean</p> <p>you can call the method via the monster namespace <code>Monster.Types.isBoolean()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; console.log(Monster.Types.isBoolean('2')) // ↦ false console.log(Monster.Types.isBoolean([])) // ↦ false console.log(Monster.Types.isBoolean(true)) // ↦ true @@ -403,7 +403,7 @@ console.log(Monster.Types.isBoolean(true)) // ↦ true </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; +import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; console.log(isBoolean('2')) // ↦ false console.log(isBoolean([])) // ↦ false console.log(isBoolean(2>4)) // ↦ true @@ -571,7 +571,7 @@ console.log(isBoolean(2>4)) // ↦ true <p>checks whether the value passed is a function</p> <p>you can call the method via the monster namespace <code>Monster.Types.isFunction()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; console.log(Monster.Types.isFunction(()=>{})) // ↦ true console.log(Monster.Types.isFunction('2')) // ↦ false console.log(Monster.Types.isFunction([])) // ↦ false @@ -579,7 +579,7 @@ console.log(Monster.Types.isFunction([])) // ↦ false </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; +import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; console.log(isFunction(()=>{})) // ↦ true console.log(isFunction('2')) // ↦ false console.log(isFunction([])) // ↦ false @@ -747,7 +747,7 @@ console.log(isFunction([])) // ↦ false <p>checks whether the value passed is a object</p> <p>you can call the method via the monster namespace <code>Monster.Types.isObject()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; console.log(Monster.Types.isObject('2')) // ↦ false console.log(Monster.Types.isObject([])) // ↦ false console.log(Monster.Types.isObject({})) // ↦ true @@ -755,7 +755,7 @@ console.log(Monster.Types.isObject({})) // ↦ true </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; +import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; console.log(isObject('2')) // ↦ false console.log(isObject([])) // ↦ false </script> @@ -922,14 +922,14 @@ console.log(isObject([])) // ↦ false <p>checks whether the value passed is a primitive (string, number, boolean or symbol)</p> <p>you can call the method via the monster namespace <code>Monster.Types.isPrimitive()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; console.log(Monster.Types.isPrimitive('2')) // ↦ false console.log(Monster.Types.isPrimitive([])) // ↦ true </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; +import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; console.log(isPrimitive('2')) // ↦ true console.log(isPrimitive([])) // ↦ false </script> @@ -1096,14 +1096,14 @@ console.log(isPrimitive([])) // ↦ false <p>checks whether the value passed is a string</p> <p>you can call the method via the monster namespace <code>Monster.Types.isString()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; console.log(Monster.Types.isString('2')) // ↦ true console.log(Monster.Types.isString([])) // ↦ false </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; +import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; console.log(isString('2')) // ↦ true console.log(isString([])) // ↦ false </script> @@ -1270,14 +1270,14 @@ console.log(isString([])) // ↦ false <p>this method checks if the type matches the array type. this function is identical to isArray() except that a TypeError is thrown.</p> <p>you can call the method via the monster namespace <code>Monster.Types.validateArray()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; console.log(Monster.Types.validateArray('2')) // ↦ TypeError console.log(Monster.Types.validateArray([])) // ↦ undefined </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; +import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; console.log(validateArray('2')) // ↦ TypeError console.log(validateArray([])) // ↦ undefined </script> @@ -1473,7 +1473,7 @@ console.log(validateArray([])) // ↦ undefined <p>this method checks if the type matches the boolean type. this function is identical to isBoolean() except that a TypeError is thrown.</p> <p>you can call the method via the monster namespace <code>Monster.Types.validateBoolean()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; console.log(Monster.Types.validateBoolean(true)) // ↦ undefined console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError console.log(Monster.Types.validateBoolean([])) // ↦ TypeError @@ -1481,7 +1481,7 @@ console.log(Monster.Types.validateBoolean([])) // ↦ TypeError </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; +import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; console.log(validateBoolean(false)) // ↦ undefined console.log(validateBoolean('2')) // ↦ TypeError console.log(validateBoolean([])) // ↦ TypeError @@ -1678,7 +1678,7 @@ console.log(validateBoolean([])) // ↦ TypeError <p>this method checks if the type matches the function type. this function is identical to isFunction() except that a TypeError is thrown.</p> <p>you can call the method via the monster namespace <code>Monster.Types.validateFunction()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; console.log(Monster.Types.validateFunction(()=>{})) // ↦ undefined console.log(Monster.Types.validateFunction('2')) // ↦ TypeError console.log(Monster.Types.validateFunction([])) // ↦ TypeError @@ -1686,7 +1686,7 @@ console.log(Monster.Types.validateFunction([])) // ↦ TypeError </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; +import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; console.log(validateFunction(()=>{})) // ↦ undefined console.log(validateFunction('2')) // ↦ TypeError console.log(validateFunction([])) // ↦ TypeError @@ -1883,7 +1883,7 @@ console.log(validateFunction([])) // ↦ TypeError <p>this method checks if the type matches the object type. this function is identical to isObject() except that a TypeError is thrown.</p> <p>you can call the method via the monster namespace <code>Monster.Types.validateObject()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; console.log(Monster.Types.validateObject({})) // ↦ undefined console.log(Monster.Types.validateObject('2')) // ↦ TypeError console.log(Monster.Types.validateObject([])) // ↦ TypeError @@ -1891,7 +1891,7 @@ console.log(Monster.Types.validateObject([])) // ↦ TypeError </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; +import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; console.log(validateObject({})) // ↦ undefined console.log(validateObject('2')) // ↦ TypeError console.log(validateObject([])) // ↦ TypeError @@ -2099,14 +2099,14 @@ console.log(validateObject([])) // ↦ TypeError <p>this method checks if the type matches the primitive type. this function is identical to isPrimitive() except that a TypeError is thrown.</p> <p>you can call the method via the monster namespace <code>Monster.Types.validatePrimitive()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; console.log(Monster.Types.validatePrimitive('2')) // ↦ undefined console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; +import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; console.log(validatePrimitive('2')) // ↦ undefined console.log(validatePrimitive([])) // ↦ TypeError </script> @@ -2302,14 +2302,14 @@ console.log(validatePrimitive([])) // ↦ TypeError <p>this method checks if the type matches the string type. this function is identical to isString() except that a TypeError is thrown.</p> <p>you can call the method via the monster namespace <code>Monster.Types.validateString()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; console.log(Monster.Types.validateString('2')) // ↦ undefined console.log(Monster.Types.validateString([])) // ↦ TypeError </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; +import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; console.log(validateString('2')) // ↦ undefined console.log(validateString([])) // ↦ TypeError </script> diff --git a/docs/Monster_Util.html b/docs/Monster_Util.html index c20e6e280..cc654c054 100644 --- a/docs/Monster_Util.html +++ b/docs/Monster_Util.html @@ -206,13 +206,13 @@ Global objects such as windows are also not cloned,</p> <p>If an object has a method <code>getClone()</code>, this method is used to create the clone.</p> <p>you can call the method via the monster namespace <code>Monster.Util.clone()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/clone.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/clone.js'; console.log(Monster.Util.clone({})) </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/clone.js'; +import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/clone.js'; console.log(clone({})) </script> </code></pre> @@ -407,13 +407,13 @@ console.log(clone({})) <p>deep freeze a object</p> <p>you can call the method via the monster namespace <code>Monster.Util.deepFreeze()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/freeze.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/freeze.js'; console.log(Monster.Util.deepFreeze({})) </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/freeze.js'; +import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/freeze.js'; console.log(deepFreeze({})) </script> </code></pre> diff --git a/docs/global.html#Monster b/docs/global.html#Monster index 667d8fcec..b03652247 100644 --- a/docs/global.html#Monster +++ b/docs/global.html#Monster @@ -204,7 +204,7 @@ <p>you must call the method in the monster namespace. this allows you to mount your own classes, objects and functions into the namespace.</p> <p>To avoid confusion and so that you do not accidentally overwrite existing functions, you should use the custom namespace <code>X</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/namespace.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/namespace.js'; function hello() { console.log('Hello World!'); } @@ -397,14 +397,14 @@ Monster.X.hello(); // ↦ Hello World! <p>Version of monster</p> <p>you can call the method via the monster namespace <code>Monster.getVersion()</code>.</p> <pre class="prettyprint source"><code><script type="module"> -import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; +import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; console.log(Monster.getVersion()) console.log(Monster.getVersion()) </script> </code></pre> <p>Alternatively, you can also integrate this function individually.</p> <pre class="prettyprint source"><code><script type="module"> -import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; +import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; console.log(getVersion()) console.log(getVersion()) </script> diff --git a/docs/index.html b/docs/index.html index d61562778..9b5d28037 100644 --- a/docs/index.html +++ b/docs/index.html @@ -76,7 +76,21 @@ make doc // create documentation and push to aws -make doc +make doc-2-aws + +// build all packages +make build + +// test all packages +make test + +// build packages +PACKAGE=monster +make build-${PACKAGES} +make build-browser-test-${PACKAGES} +make test-${PACKAGES} +make npm-publish-${PACKAGES} + </code></pre> <h2>Packages</h2> <table> @@ -110,8 +124,7 @@ make doc </ul> <p><strong>you can also purchase a commercial licence</strong></p> <h2>Changelog</h2> -<p>Detailed changes for each release are documented in -the <a href="https://gitlab.schukai.com/oss/libraries/javascript/monster/-/releases">release notes</a>.</p></article> +<p>Detailed changes for each release are documented in the corresponding CHANGELOG file.</p></article> </section> diff --git a/docs/math_random.js.html b/docs/math_random.js.html index 3aa697da6..cbdb05729 100644 --- a/docs/math_random.js.html +++ b/docs/math_random.js.html @@ -63,7 +63,7 @@ import {Monster} from '../namespace.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/math/random.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/math/random.js'; * console.log(Monster.Math.random(1,10)) // ↦ 5 * </script> * ``` @@ -72,7 +72,7 @@ import {Monster} from '../namespace.js'; * * ``` * <script type="module"> - * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/math/random.js'; + * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/math/random.js'; * console.log(random(1,10)) // ↦ 5 * </script> * ``` diff --git a/docs/namespace.js.html b/docs/namespace.js.html index a96745441..2520e8f65 100644 --- a/docs/namespace.js.html +++ b/docs/namespace.js.html @@ -120,7 +120,7 @@ assignToNamespace('Monster', assignToNamespace); * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/namespace.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/namespace.js'; * function hello() { * console.log('Hello World!'); * } diff --git a/docs/types_id.js.html b/docs/types_id.js.html index de3db93fc..49e71b942 100644 --- a/docs/types_id.js.html +++ b/docs/types_id.js.html @@ -64,7 +64,7 @@ let internalCounter = 0; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/id.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/id.js'; * console.log(new Monster.Types.ID()) * console.log(new Monster.Types.ID()) * </script> @@ -74,7 +74,7 @@ let internalCounter = 0; * * ``` * <script type="module"> - * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/id.js'; + * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/id.js'; * console.log(new ID()) * console.log(new ID()) * </script> diff --git a/docs/types_is.js.html b/docs/types_is.js.html index d7213246b..cd765c301 100644 --- a/docs/types_is.js.html +++ b/docs/types_is.js.html @@ -62,7 +62,7 @@ import {Monster} from '../namespace.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isPrimitive('2')) // ↦ false * console.log(Monster.Types.isPrimitive([])) // ↦ true * </script> @@ -72,7 +72,7 @@ import {Monster} from '../namespace.js'; * * ``` * <script type="module"> - * import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isPrimitive('2')) // ↦ true * console.log(isPrimitive([])) // ↦ false * </script> @@ -107,7 +107,7 @@ function isPrimitive(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isBoolean('2')) // ↦ false * console.log(Monster.Types.isBoolean([])) // ↦ false * console.log(Monster.Types.isBoolean(true)) // ↦ true @@ -118,7 +118,7 @@ function isPrimitive(value) { * * ``` * <script type="module"> - * import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isBoolean('2')) // ↦ false * console.log(isBoolean([])) // ↦ false * console.log(isBoolean(2>4)) // ↦ true @@ -147,7 +147,7 @@ function isBoolean(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isString('2')) // ↦ true * console.log(Monster.Types.isString([])) // ↦ false * </script> @@ -157,7 +157,7 @@ function isBoolean(value) { * * ``` * <script type="module"> - * import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isString('2')) // ↦ true * console.log(isString([])) // ↦ false * </script> @@ -183,7 +183,7 @@ function isString(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isObject('2')) // ↦ false * console.log(Monster.Types.isObject([])) // ↦ false * console.log(Monster.Types.isObject({})) // ↦ true @@ -194,7 +194,7 @@ function isString(value) { * * ``` * <script type="module"> - * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isObject('2')) // ↦ false * console.log(isObject([])) // ↦ false * </script> @@ -225,7 +225,7 @@ function isObject(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isArray('2')) // ↦ false * console.log(Monster.Types.isArray([])) // ↦ true * </script> @@ -235,7 +235,7 @@ function isObject(value) { * * ``` * <script type="module"> - * import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isArray('2')) // ↦ false * console.log(isArray([])) // ↦ true * </script> @@ -261,7 +261,7 @@ function isArray(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isFunction(()=>{})) // ↦ true * console.log(Monster.Types.isFunction('2')) // ↦ false * console.log(Monster.Types.isFunction([])) // ↦ false @@ -272,7 +272,7 @@ function isArray(value) { * * ``` * <script type="module"> - * import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isFunction(()=>{})) // ↦ true * console.log(isFunction('2')) // ↦ false * console.log(isFunction([])) // ↦ false diff --git a/docs/types_object.js.html b/docs/types_object.js.html index be44c0a7f..97170eb76 100644 --- a/docs/types_object.js.html +++ b/docs/types_object.js.html @@ -63,7 +63,7 @@ import {Monster} from '../namespace.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/object.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/object.js'; * console.log(new Monster.Types.Object()) * console.log(new Monster.Types.Object()) * </script> @@ -73,7 +73,7 @@ import {Monster} from '../namespace.js'; * * ``` * <script type="module"> - * import {Object} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/object.js'; + * import {Object} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/object.js'; * console.log(new Object()) * console.log(new Object()) * </script> diff --git a/docs/types_observer.js.html b/docs/types_observer.js.html index 8824e6aba..b04d24a81 100644 --- a/docs/types_observer.js.html +++ b/docs/types_observer.js.html @@ -63,7 +63,7 @@ import '../types/object.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observer.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observer.js'; * console.log(new Monster.Types.Observer()) * console.log(new Monster.Types.Observer()) * </script> @@ -73,7 +73,7 @@ import '../types/object.js'; * * ``` * <script type="module"> - * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observer.js'; + * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observer.js'; * console.log(Observer()) * console.log(Observer()) * </script> diff --git a/docs/types_observerlist.js.html b/docs/types_observerlist.js.html index 899cf4bc6..a7fc8d79d 100644 --- a/docs/types_observerlist.js.html +++ b/docs/types_observerlist.js.html @@ -63,7 +63,7 @@ import '../types/object.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observerlist.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observerlist.js'; * console.log(new Monster.Types.ObserverList()) * console.log(new Monster.Types.ObserverList()) * </script> @@ -73,7 +73,7 @@ import '../types/object.js'; * * ``` * <script type="module"> - * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observerlist.js'; + * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observerlist.js'; * console.log(ObserverList()) * console.log(ObserverList()) * </script> diff --git a/docs/types_validate.js.html b/docs/types_validate.js.html index 5e62db536..3bee5c2ab 100644 --- a/docs/types_validate.js.html +++ b/docs/types_validate.js.html @@ -63,7 +63,7 @@ import {isPrimitive, isBoolean, isString, isObject, isArray, isFunction} from '. * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validatePrimitive('2')) // ↦ undefined * console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError * </script> @@ -73,7 +73,7 @@ import {isPrimitive, isBoolean, isString, isObject, isArray, isFunction} from '. * * ``` * <script type="module"> - * import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validatePrimitive('2')) // ↦ undefined * console.log(validatePrimitive([])) // ↦ TypeError * </script> @@ -102,7 +102,7 @@ function validatePrimitive(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateBoolean(true)) // ↦ undefined * console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError * console.log(Monster.Types.validateBoolean([])) // ↦ TypeError @@ -113,7 +113,7 @@ function validatePrimitive(value) { * * ``` * <script type="module"> - * import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateBoolean(false)) // ↦ undefined * console.log(validateBoolean('2')) // ↦ TypeError * console.log(validateBoolean([])) // ↦ TypeError @@ -141,7 +141,7 @@ function validateBoolean(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateString('2')) // ↦ undefined * console.log(Monster.Types.validateString([])) // ↦ TypeError * </script> @@ -151,7 +151,7 @@ function validateBoolean(value) { * * ``` * <script type="module"> - * import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateString('2')) // ↦ undefined * console.log(validateString([])) // ↦ TypeError * </script> @@ -179,7 +179,7 @@ function validateString(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateObject({})) // ↦ undefined * console.log(Monster.Types.validateObject('2')) // ↦ TypeError * console.log(Monster.Types.validateObject([])) // ↦ TypeError @@ -190,7 +190,7 @@ function validateString(value) { * * ``` * <script type="module"> - * import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateObject({})) // ↦ undefined * console.log(validateObject('2')) // ↦ TypeError * console.log(validateObject([])) // ↦ TypeError @@ -217,7 +217,7 @@ function validateObject(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateArray('2')) // ↦ TypeError * console.log(Monster.Types.validateArray([])) // ↦ undefined * </script> @@ -227,7 +227,7 @@ function validateObject(value) { * * ``` * <script type="module"> - * import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateArray('2')) // ↦ TypeError * console.log(validateArray([])) // ↦ undefined * </script> @@ -253,7 +253,7 @@ function validateArray(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateFunction(()=>{})) // ↦ undefined * console.log(Monster.Types.validateFunction('2')) // ↦ TypeError * console.log(Monster.Types.validateFunction([])) // ↦ TypeError @@ -264,7 +264,7 @@ function validateArray(value) { * * ``` * <script type="module"> - * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateFunction(()=>{})) // ↦ undefined * console.log(validateFunction('2')) // ↦ TypeError * console.log(validateFunction([])) // ↦ TypeError diff --git a/docs/types_version.js.html b/docs/types_version.js.html index 9651e3e3c..d1a12e875 100644 --- a/docs/types_version.js.html +++ b/docs/types_version.js.html @@ -59,7 +59,7 @@ import '../types/object.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; * console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3 * console.log(new Monster.Types.Version('1')) // ↦ 1.0.0 * </script> @@ -69,7 +69,7 @@ import '../types/object.js'; * * ``` * <script type="module"> - * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; + * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; * console.log(new Version('1.2.3')) // ↦ 1.2.3 * console.log(new Version('1')) // ↦ 1.0.0 * </script> @@ -199,7 +199,7 @@ let monsterVersion; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; * console.log(Monster.getVersion()) * console.log(Monster.getVersion()) * </script> @@ -209,7 +209,7 @@ let monsterVersion; * * ``` * <script type="module"> - * import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; + * import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; * console.log(getVersion()) * console.log(getVersion()) * </script> @@ -226,7 +226,7 @@ function getVersion() { return monsterVersion; } /**#@+ dont touch, replaced by make with package.json version */ - monsterVersion = new Version('1.0.14') + monsterVersion = new Version('1.1.0') /**#@-*/ return monsterVersion; diff --git a/docs/util_clone.js.html b/docs/util_clone.js.html index 7d78001a7..c94f37479 100644 --- a/docs/util_clone.js.html +++ b/docs/util_clone.js.html @@ -70,7 +70,7 @@ import {isObject, isFunction, isPrimitive, isArray} from '../types/is.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/clone.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/clone.js'; * console.log(Monster.Util.clone({})) * </script> * ``` @@ -79,7 +79,7 @@ import {isObject, isFunction, isPrimitive, isArray} from '../types/is.js'; * * ``` * <script type="module"> - * import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/clone.js'; + * import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/clone.js'; * console.log(clone({})) * </script> * ``` diff --git a/docs/util_freeze.js.html b/docs/util_freeze.js.html index a95a7fd9d..424a3ad5f 100644 --- a/docs/util_freeze.js.html +++ b/docs/util_freeze.js.html @@ -63,7 +63,7 @@ import {validateObject} from '../types/validate.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/freeze.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/freeze.js'; * console.log(Monster.Util.deepFreeze({})) * </script> * ``` @@ -72,7 +72,7 @@ import {validateObject} from '../types/validate.js'; * * ``` * <script type="module"> - * import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/freeze.js'; + * import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/freeze.js'; * console.log(deepFreeze({})) * </script> * ``` diff --git a/packages/monster/CHANGELOG b/packages/monster/CHANGELOG new file mode 100644 index 000000000..4d470ab83 --- /dev/null +++ b/packages/monster/CHANGELOG @@ -0,0 +1,12 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## [1.1.0] - 202106-28 + +### Added + +- Monster.Types +- Monster.Util +- Monster.Math + diff --git a/packages/monster/README.md b/packages/monster/README.md index 8a0ab9218..395b539d3 100644 --- a/packages/monster/README.md +++ b/packages/monster/README.md @@ -29,7 +29,7 @@ thus supports all browsers that are compatible with ES5. ``` <script type="module"> - import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.14/dist/modules/monster.js'; + import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.15/dist/modules/monster.js'; console.log(Module.getVersion()) </script> ``` @@ -38,7 +38,7 @@ nomodule for backwards compatibility ``` <script type="module" src="module.mjs"></script> -<script nomodule src="https://unpkg.com/@schukai/monster@1.0.14/dist/monster.js"></script> +<script nomodule src="https://unpkg.com/@schukai/monster@1.0.15/dist/monster.js"></script> ``` ## Documentation @@ -66,5 +66,5 @@ you can also purchase a commercial licence ## Changelog Detailed changes for each release are documented in -the [release notes](https://gitlab.schukai.com/oss/libraries/javascript/monster/-/releases). +the [CHANGELOG](CHANGELOG). diff --git a/packages/monster/dist/modules/math/namespace.js b/packages/monster/dist/modules/math/namespace.js index 58f7f09a1..bfa3a861c 100644 --- a/packages/monster/dist/modules/math/namespace.js +++ b/packages/monster/dist/modules/math/namespace.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict'; diff --git a/packages/monster/dist/modules/math/random.js b/packages/monster/dist/modules/math/random.js index 05b641f8f..6fbd3541f 100644 --- a/packages/monster/dist/modules/math/random.js +++ b/packages/monster/dist/modules/math/random.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict';import{Monster}from"../namespace.js";function random(min,max){if(min===undefined){min=0}if(max===undefined){max=MAX}if(max<min){throw new Error("max must be greater than min")}return Math.round(create(min,max))}var MAX=1000000000;Math.log2=Math.log2||function(n){return Math.log(n)/Math.log(2)};function create(min,max){var crypt;if(typeof global!=="undefined"){crypt=global?.["crypto"]||global?.["msCrypto"]}else{crypt=typeof crypto!=="undefined"?crypto:undefined}if(typeof crypt==="undefined"){throw new Error("missing crypt")}let rval=0;const range=max-min;if(range<2){return min}const bitsNeeded=Math.ceil(Math.log2(range));if(bitsNeeded>53){throw new Error("we cannot generate numbers larger than 53 bits.")}const bytesNeeded=Math.ceil(bitsNeeded/8);const mask=Math.pow(2,bitsNeeded)-1;const byteArray=new Uint8Array(bytesNeeded);crypt.getRandomValues(byteArray);let p=(bytesNeeded-1)*8;for(var i=0;i<bytesNeeded;i++){rval+=byteArray[i]*Math.pow(2,p);p-=8}rval=rval&mask;if(rval>=range){return create(min,max)}return min+rval}Monster.assignToNamespace("Monster.Math",random);export{Monster,random}; diff --git a/packages/monster/dist/modules/monster.js b/packages/monster/dist/modules/monster.js index 58ff161e4..dffa86d82 100644 --- a/packages/monster/dist/modules/monster.js +++ b/packages/monster/dist/modules/monster.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict';import{Monster}from"./namespace.js";import"./types/id.js";import"./types/is.js";import"./types/object.js";import"./types/version.js";import"./types/observer.js";import"./types/observerlist.js";import"./types/validate.js";import"./math/random.js";import"./util/clone.js";import"./util/freeze.js";Monster.Util.deepFreeze(Monster);export{Monster}; diff --git a/packages/monster/dist/modules/namespace.js b/packages/monster/dist/modules/namespace.js index b2dff1a30..92457d394 100644 --- a/packages/monster/dist/modules/namespace.js +++ b/packages/monster/dist/modules/namespace.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict';class Namespace{constructor(namespace){if(namespace===undefined||typeof namespace!=="string"){throw new Error("namespace is not a string")}this.namespace=namespace}getNamespace(){return this.namespace}toString(){return this.getNamespace()}}export const Monster=new Namespace("Monster");assignToNamespace("Monster",assignToNamespace);function assignToNamespace(ns,...obj){let current=namespaceFor(ns.split("."));for(let i=0,l=obj.length;i<l;i++){current[objectName(obj[i])]=obj[i]}}function objectName(fn){try{if(typeof fn!=="function"){throw new Error("the first argument is not a function or class.")}if(fn.hasOwnProperty("name")){return fn.name}if("function"===typeof fn.toString){let s=fn.toString();let f=s.match(/^\s*function\s+([^\s(]+)/);if(Array.isArray(f)&&typeof f[1]==="string"){return f[1]}let c=s.match(/^\s*class\s+([^\s(]+)/);if(Array.isArray(c)&&typeof c[1]==="string"){return c[1]}}}catch(e){throw new Error("exception "+e)}throw new Error("the name of the class or function cannot be resolved.")}function namespaceFor(parts){var space=Monster,ns="Monster";for(let i=0;i<parts.length;i++){if("Monster"===parts[i]){continue}ns+="."+parts[i];if(!space.hasOwnProperty(parts[i])){space[parts[i]]=new Namespace(ns)}space=space[parts[i]]}return space}export{assignToNamespace}; diff --git a/packages/monster/dist/modules/types/id.js b/packages/monster/dist/modules/types/id.js index 98d4f9ada..0aa02af03 100644 --- a/packages/monster/dist/modules/types/id.js +++ b/packages/monster/dist/modules/types/id.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict';import{Monster}from"../namespace.js";import"../types/object.js";let internalCounter=0;class ID extends Monster.Types.Object{constructor(){super();internalCounter+=1;this.id=global.btoa(Monster.Math.random(1,10000)).replace(/=/g,"").replace(/^[0-9]+/,"X")+internalCounter}toString(){return this.id}}Monster.assignToNamespace("Monster.Types",ID);export{Monster,ID}; diff --git a/packages/monster/dist/modules/types/is.js b/packages/monster/dist/modules/types/is.js index 0382766f8..135469a39 100644 --- a/packages/monster/dist/modules/types/is.js +++ b/packages/monster/dist/modules/types/is.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict';import{Monster}from"../namespace.js";function isPrimitive(value){var type;if(value===undefined||value===null){return true}type=typeof value;if(type==="string"||type==="number"||type==="boolean"||type==="symbol"){return true}return false}function isBoolean(value){if(value===true||value===false){return true}return false}function isString(value){if(value===undefined||typeof value!=="string"){return false}return true}function isObject(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(typeof value==="object"){return true}return false}function isArray(value){if(Array.isArray(value)){return true}return false}function isFunction(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(typeof value==="function"){return true}return false}Monster.assignToNamespace("Monster.Types",isPrimitive,isBoolean,isString,isObject,isArray,isFunction);export{Monster,isPrimitive,isBoolean,isString,isObject,isArray,isFunction}; diff --git a/packages/monster/dist/modules/types/namespace.js b/packages/monster/dist/modules/types/namespace.js index 58f7f09a1..bfa3a861c 100644 --- a/packages/monster/dist/modules/types/namespace.js +++ b/packages/monster/dist/modules/types/namespace.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict'; diff --git a/packages/monster/dist/modules/types/object.js b/packages/monster/dist/modules/types/object.js index ce1b69ab8..d59d3a4e0 100644 --- a/packages/monster/dist/modules/types/object.js +++ b/packages/monster/dist/modules/types/object.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict';import{Monster}from"../namespace.js";class Object{constructor(){}toString(){return JSON.stringify(this)}}Monster.assignToNamespace("Monster.Types",Object);export{Monster,Object}; diff --git a/packages/monster/dist/modules/types/observer.js b/packages/monster/dist/modules/types/observer.js index 71d8e7faa..b7267cea6 100644 --- a/packages/monster/dist/modules/types/observer.js +++ b/packages/monster/dist/modules/types/observer.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict';import{Monster}from"../namespace.js";import"../types/object.js";class Observer extends Monster.Types.Object{constructor(callback,...args){super();if(typeof callback!=="function"){throw new Error("observer callback must be a function")}this.callback=callback;this.arguments=args;this.tags=new Set}addTag(tag){this.tags.add(tag);return this}removeTag(tag){this.tags.delete(tag);return this}getTags(){return this.tags}hasTag(tag){return this.tags.has(tag)}update(subject){let self=this;return new Promise(function(resolve,reject){if(!(subject instanceof Object)){reject("subject must be an object")}let result=self.callback.apply(subject,self.arguments);resolve(result)})}}Monster.assignToNamespace("Monster.Types",Observer);export{Monster,Observer}; diff --git a/packages/monster/dist/modules/types/observerlist.js b/packages/monster/dist/modules/types/observerlist.js index b79124e20..b7fbade9c 100644 --- a/packages/monster/dist/modules/types/observerlist.js +++ b/packages/monster/dist/modules/types/observerlist.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict';import{Monster}from"../namespace.js";import"../types/object.js";class ObserverList extends Monster.Types.Object{constructor(){super();this.observers=[]}attach(observer){checkIsObserver(observer);this.observers.push(observer);return this}detach(observer){checkIsObserver(observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){this.observers.splice(i,1)}}return this}contains(observer){checkIsObserver(observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){return true}}return false}notify(subject){let pomises=[];var i=0,l=this.observers.length;for(;i<l;i++){pomises.push(this.observers[i].update(subject))}return Promise.all(pomises)}}function checkIsObserver(observer){if(!(observer instanceof Monster.Types.Observer)){throw new Error("argument must be instance of observer")}return true}Monster.assignToNamespace("Monster.Types",ObserverList);export{Monster,ObserverList}; diff --git a/packages/monster/dist/modules/types/validate.js b/packages/monster/dist/modules/types/validate.js index 9941a6859..ff66b4d25 100644 --- a/packages/monster/dist/modules/types/validate.js +++ b/packages/monster/dist/modules/types/validate.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict';import{Monster}from"../namespace.js";import{isPrimitive,isBoolean,isString,isObject,isArray,isFunction}from"../types/is.js";function validatePrimitive(value){if(!isPrimitive(value)){throw new TypeError("value is not a primitive")}}function validateBoolean(value){if(!isBoolean(value)){throw new TypeError("value is not a boolean")}}function validateString(value){if(!isString(value)){throw new TypeError("value is not a string")}}function validateObject(value){if(!isObject(value)){throw new TypeError("value is not a object")}}function validateArray(value){if(!isArray(value)){throw new TypeError("value is not not a array")}}function validateFunction(value){if(!isFunction(value)){throw new TypeError("value is not a function")}}Monster.assignToNamespace("Monster.Types",validatePrimitive,validateBoolean,validateString,validateObject,validateArray,validateFunction);export{Monster,validatePrimitive,validateBoolean,validateString,validateObject,validateArray,validateFunction}; diff --git a/packages/monster/dist/modules/types/version.js b/packages/monster/dist/modules/types/version.js index 3d513071e..e846fcf56 100644 --- a/packages/monster/dist/modules/types/version.js +++ b/packages/monster/dist/modules/types/version.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ -'use strict';import{Monster}from"../namespace.js";import"../types/object.js";class Version extends Monster.Types.Object{constructor(major,minor,patch){super();if(typeof major==="string"&&minor===undefined&&patch===undefined){let parts=major.toString().split(".");major=parseInt(parts[0]||0);minor=parseInt(parts[1]||0);patch=parseInt(parts[2]||0)}if(major===undefined){throw new Error("major version is undefined")}if(minor===undefined){minor=0}if(patch===undefined){patch=0}this.major=parseInt(major);this.minor=parseInt(minor);this.patch=parseInt(patch);if(isNaN(this.major)){throw new Error("major is not a number")}if(isNaN(this.minor)){throw new Error("minor is not a number")}if(isNaN(this.patch)){throw new Error("patch is not a number")}}toString(){return this.major+"."+this.minor+"."+this.patch}compareTo(version){if(version instanceof Version){version=version.toString()}if(typeof version!=="string"){throw new Error("type exception")}if(version===this.toString()){return 0}let a=[this.major,this.minor,this.patch];let b=version.split(".");let len=Math.max(a.length,b.length);for(let i=0;i<len;i+=1){if(a[i]&&!b[i]&&parseInt(a[i])>0||parseInt(a[i])>parseInt(b[i])){return 1}else if(b[i]&&!a[i]&&parseInt(b[i])>0||parseInt(a[i])<parseInt(b[i])){return-1}}return 0}}Monster.assignToNamespace("Monster.Types",Version);let monsterVersion;function getVersion(){if(monsterVersion instanceof Version){return monsterVersion}monsterVersion=new Version("1.0.14");return monsterVersion}Monster.assignToNamespace("Monster",getVersion);export{Monster,Version,getVersion}; +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +'use strict';import{Monster}from"../namespace.js";import"../types/object.js";class Version extends Monster.Types.Object{constructor(major,minor,patch){super();if(typeof major==="string"&&minor===undefined&&patch===undefined){let parts=major.toString().split(".");major=parseInt(parts[0]||0);minor=parseInt(parts[1]||0);patch=parseInt(parts[2]||0)}if(major===undefined){throw new Error("major version is undefined")}if(minor===undefined){minor=0}if(patch===undefined){patch=0}this.major=parseInt(major);this.minor=parseInt(minor);this.patch=parseInt(patch);if(isNaN(this.major)){throw new Error("major is not a number")}if(isNaN(this.minor)){throw new Error("minor is not a number")}if(isNaN(this.patch)){throw new Error("patch is not a number")}}toString(){return this.major+"."+this.minor+"."+this.patch}compareTo(version){if(version instanceof Version){version=version.toString()}if(typeof version!=="string"){throw new Error("type exception")}if(version===this.toString()){return 0}let a=[this.major,this.minor,this.patch];let b=version.split(".");let len=Math.max(a.length,b.length);for(let i=0;i<len;i+=1){if(a[i]&&!b[i]&&parseInt(a[i])>0||parseInt(a[i])>parseInt(b[i])){return 1}else if(b[i]&&!a[i]&&parseInt(b[i])>0||parseInt(a[i])<parseInt(b[i])){return-1}}return 0}}Monster.assignToNamespace("Monster.Types",Version);let monsterVersion;function getVersion(){if(monsterVersion instanceof Version){return monsterVersion}monsterVersion=new Version("1.1.0");return monsterVersion}Monster.assignToNamespace("Monster",getVersion);export{Monster,Version,getVersion}; diff --git a/packages/monster/dist/modules/util/clone.js b/packages/monster/dist/modules/util/clone.js index 28e614ed2..d97589897 100644 --- a/packages/monster/dist/modules/util/clone.js +++ b/packages/monster/dist/modules/util/clone.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict';import{Monster}from"../namespace.js";import{isObject,isFunction,isPrimitive,isArray}from"../types/is.js";function clone(obj){if(null===obj){return obj}if(isPrimitive(obj)){return obj}if(isFunction(obj)){return obj}if(isArray(obj)){let copy=[];for(var i=0,len=obj.length;i<len;i++){copy[i]=clone(obj[i])}return copy}if(isObject(obj)){if(obj instanceof Date){let copy=new Date;copy.setTime(obj.getTime());return copy}if(typeof Element!=="undefined"&&obj instanceof Element)return obj;if(typeof HTMLDocument!=="undefined"&&obj instanceof HTMLDocument)return obj;if(typeof DocumentFragment!=="undefined"&&obj instanceof DocumentFragment)return obj;if(typeof globalContext!=="undefined"&&obj===globalContext)return obj;if(typeof window!=="undefined"&&obj===window)return obj;if(typeof document!=="undefined"&&obj===document)return obj;if(typeof navigator!=="undefined"&&obj===navigator)return obj;if(typeof JSON!=="undefined"&&obj===JSON)return obj;try{if(obj instanceof Proxy){return obj}}catch(e){}return cloneObject(obj)}throw new Error("unable to clone obj! its type isn't supported.")}function cloneObject(obj){var copy;if(typeof obj.hasOwnProperty("getClone")&&obj.getClone==="function"){return obj.getClone()}copy={};if(typeof obj.constructor==="function"&&typeof obj.constructor.call==="function"){copy=new obj.constructor}for(let key in obj){if(!obj.hasOwnProperty(key)){continue}if(Monster.Types.isPrimitive(obj[key])){copy[key]=obj[key];continue}copy[key]=clone(obj[key])}return copy}Monster.assignToNamespace("Monster.Util",clone);export{Monster,clone}; diff --git a/packages/monster/dist/modules/util/freeze.js b/packages/monster/dist/modules/util/freeze.js index 86d2d614a..29c6bd5b9 100644 --- a/packages/monster/dist/modules/util/freeze.js +++ b/packages/monster/dist/modules/util/freeze.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict';import{Monster}from"../namespace.js";import{validateObject}from"../types/validate.js";function deepFreeze(object){validateObject(object);var propNames=Object.getOwnPropertyNames(object);for(let name of propNames){let value=object[name];object[name]=value&&typeof value==="object"?deepFreeze(value):value}return Object.freeze(object)}Monster.assignToNamespace("Monster.Util",deepFreeze);export{Monster,deepFreeze}; diff --git a/packages/monster/dist/modules/util/namespace.js b/packages/monster/dist/modules/util/namespace.js index 58f7f09a1..bfa3a861c 100644 --- a/packages/monster/dist/modules/util/namespace.js +++ b/packages/monster/dist/modules/util/namespace.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ 'use strict'; diff --git a/packages/monster/dist/monster.dev.js b/packages/monster/dist/monster.dev.js index 575b6719e..2f21acbef 100644 --- a/packages/monster/dist/monster.dev.js +++ b/packages/monster/dist/monster.dev.js @@ -25,7 +25,7 @@ var _namespace = require("../namespace.js"); * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/math/random.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/math/random.js'; * console.log(Monster.Math.random(1,10)) // ↦ 5 * </script> * ``` @@ -34,7 +34,7 @@ var _namespace = require("../namespace.js"); * * ``` * <script type="module"> - * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/math/random.js'; + * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/math/random.js'; * console.log(random(1,10)) // ↦ 5 * </script> * ``` @@ -267,7 +267,7 @@ assignToNamespace('Monster', assignToNamespace); * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/namespace.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/namespace.js'; * function hello() { * console.log('Hello World!'); * } @@ -408,7 +408,7 @@ var internalCounter = 0; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/id.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/id.js'; * console.log(new Monster.Types.ID()) * console.log(new Monster.Types.ID()) * </script> @@ -418,7 +418,7 @@ var internalCounter = 0; * * ``` * <script type="module"> - * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/id.js'; + * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/id.js'; * console.log(new ID()) * console.log(new ID()) * </script> @@ -496,7 +496,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isPrimitive('2')) // ↦ false * console.log(Monster.Types.isPrimitive([])) // ↦ true * </script> @@ -506,7 +506,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi * * ``` * <script type="module"> - * import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isPrimitive('2')) // ↦ true * console.log(isPrimitive([])) // ↦ false * </script> @@ -540,7 +540,7 @@ function isPrimitive(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isBoolean('2')) // ↦ false * console.log(Monster.Types.isBoolean([])) // ↦ false * console.log(Monster.Types.isBoolean(true)) // ↦ true @@ -551,7 +551,7 @@ function isPrimitive(value) { * * ``` * <script type="module"> - * import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isBoolean('2')) // ↦ false * console.log(isBoolean([])) // ↦ false * console.log(isBoolean(2>4)) // ↦ true @@ -580,7 +580,7 @@ function isBoolean(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isString('2')) // ↦ true * console.log(Monster.Types.isString([])) // ↦ false * </script> @@ -590,7 +590,7 @@ function isBoolean(value) { * * ``` * <script type="module"> - * import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isString('2')) // ↦ true * console.log(isString([])) // ↦ false * </script> @@ -618,7 +618,7 @@ function isString(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isObject('2')) // ↦ false * console.log(Monster.Types.isObject([])) // ↦ false * console.log(Monster.Types.isObject({})) // ↦ true @@ -629,7 +629,7 @@ function isString(value) { * * ``` * <script type="module"> - * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isObject('2')) // ↦ false * console.log(isObject([])) // ↦ false * </script> @@ -660,7 +660,7 @@ function isObject(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isArray('2')) // ↦ false * console.log(Monster.Types.isArray([])) // ↦ true * </script> @@ -670,7 +670,7 @@ function isObject(value) { * * ``` * <script type="module"> - * import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isArray('2')) // ↦ false * console.log(isArray([])) // ↦ true * </script> @@ -698,7 +698,7 @@ function isArray(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isFunction(()=>{})) // ↦ true * console.log(Monster.Types.isFunction('2')) // ↦ false * console.log(Monster.Types.isFunction([])) // ↦ false @@ -709,7 +709,7 @@ function isArray(value) { * * ``` * <script type="module"> - * import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isFunction(()=>{})) // ↦ true * console.log(isFunction('2')) // ↦ false * console.log(isFunction([])) // ↦ false @@ -769,7 +769,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/object.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/object.js'; * console.log(new Monster.Types.Object()) * console.log(new Monster.Types.Object()) * </script> @@ -779,7 +779,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d * * ``` * <script type="module"> - * import {Object} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/object.js'; + * import {Object} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/object.js'; * console.log(new Object()) * console.log(new Object()) * </script> @@ -866,7 +866,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observer.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observer.js'; * console.log(new Monster.Types.Observer()) * console.log(new Monster.Types.Observer()) * </script> @@ -876,7 +876,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g * * ``` * <script type="module"> - * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observer.js'; + * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observer.js'; * console.log(Observer()) * console.log(Observer()) * </script> @@ -1007,7 +1007,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observerlist.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observerlist.js'; * console.log(new Monster.Types.ObserverList()) * console.log(new Monster.Types.ObserverList()) * </script> @@ -1017,7 +1017,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g * * ``` * <script type="module"> - * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observerlist.js'; + * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observerlist.js'; * console.log(ObserverList()) * console.log(ObserverList()) * </script> @@ -1149,7 +1149,7 @@ var _is = require("../types/is.js"); * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validatePrimitive('2')) // ↦ undefined * console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError * </script> @@ -1159,7 +1159,7 @@ var _is = require("../types/is.js"); * * ``` * <script type="module"> - * import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validatePrimitive('2')) // ↦ undefined * console.log(validatePrimitive([])) // ↦ TypeError * </script> @@ -1187,7 +1187,7 @@ function validatePrimitive(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateBoolean(true)) // ↦ undefined * console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError * console.log(Monster.Types.validateBoolean([])) // ↦ TypeError @@ -1198,7 +1198,7 @@ function validatePrimitive(value) { * * ``` * <script type="module"> - * import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateBoolean(false)) // ↦ undefined * console.log(validateBoolean('2')) // ↦ TypeError * console.log(validateBoolean([])) // ↦ TypeError @@ -1227,7 +1227,7 @@ function validateBoolean(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateString('2')) // ↦ undefined * console.log(Monster.Types.validateString([])) // ↦ TypeError * </script> @@ -1237,7 +1237,7 @@ function validateBoolean(value) { * * ``` * <script type="module"> - * import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateString('2')) // ↦ undefined * console.log(validateString([])) // ↦ TypeError * </script> @@ -1265,7 +1265,7 @@ function validateString(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateObject({})) // ↦ undefined * console.log(Monster.Types.validateObject('2')) // ↦ TypeError * console.log(Monster.Types.validateObject([])) // ↦ TypeError @@ -1276,7 +1276,7 @@ function validateString(value) { * * ``` * <script type="module"> - * import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateObject({})) // ↦ undefined * console.log(validateObject('2')) // ↦ TypeError * console.log(validateObject([])) // ↦ TypeError @@ -1304,7 +1304,7 @@ function validateObject(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateArray('2')) // ↦ TypeError * console.log(Monster.Types.validateArray([])) // ↦ undefined * </script> @@ -1314,7 +1314,7 @@ function validateObject(value) { * * ``` * <script type="module"> - * import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateArray('2')) // ↦ TypeError * console.log(validateArray([])) // ↦ undefined * </script> @@ -1341,7 +1341,7 @@ function validateArray(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateFunction(()=>{})) // ↦ undefined * console.log(Monster.Types.validateFunction('2')) // ↦ TypeError * console.log(Monster.Types.validateFunction([])) // ↦ TypeError @@ -1352,7 +1352,7 @@ function validateArray(value) { * * ``` * <script type="module"> - * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateFunction(()=>{})) // ↦ undefined * console.log(validateFunction('2')) // ↦ TypeError * console.log(validateFunction([])) // ↦ TypeError @@ -1424,7 +1424,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; * console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3 * console.log(new Monster.Types.Version('1')) // ↦ 1.0.0 * </script> @@ -1434,7 +1434,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g * * ``` * <script type="module"> - * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; + * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; * console.log(new Version('1.2.3')) // ↦ 1.2.3 * console.log(new Version('1')) // ↦ 1.0.0 * </script> @@ -1577,7 +1577,7 @@ var monsterVersion; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; * console.log(Monster.getVersion()) * console.log(Monster.getVersion()) * </script> @@ -1587,7 +1587,7 @@ var monsterVersion; * * ``` * <script type="module"> - * import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; + * import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; * console.log(getVersion()) * console.log(getVersion()) * </script> @@ -1607,7 +1607,7 @@ function getVersion() { /**#@+ dont touch, replaced by make with package.json version */ - monsterVersion = new Version('1.0.14'); + monsterVersion = new Version('1.1.0'); /**#@-*/ return monsterVersion; @@ -1651,7 +1651,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/clone.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/clone.js'; * console.log(Monster.Util.clone({})) * </script> * ``` @@ -1660,7 +1660,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi * * ``` * <script type="module"> - * import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/clone.js'; + * import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/clone.js'; * console.log(clone({})) * </script> * ``` @@ -1812,7 +1812,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/freeze.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/freeze.js'; * console.log(Monster.Util.deepFreeze({})) * </script> * ``` @@ -1821,7 +1821,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len * * ``` * <script type="module"> - * import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/freeze.js'; + * import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/freeze.js'; * console.log(deepFreeze({})) * </script> * ``` diff --git a/packages/monster/dist/monster.dev.js.map b/packages/monster/dist/monster.dev.js.map index 42e8b3b9b..fe22e25d4 100644 --- a/packages/monster/dist/monster.dev.js.map +++ b/packages/monster/dist/monster.dev.js.map @@ -16,22 +16,22 @@ "packages/monster/source/util/freeze.js" ], "names": [], - "mappings": "AAAA;;ACAA;AAEA;AACA;AACA;;;;;;;;;;;;;AAEA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,MAAT,CAAgB,GAAhB,EAAqB,GAArB,EAA0B;AAEtB,MAAI,GAAG,KAAK,SAAZ,EAAuB;AACnB,IAAA,GAAG,GAAG,CAAN;AACH;;AACD,MAAI,GAAG,KAAK,SAAZ,EAAuB;AACnB,IAAA,GAAG,GAAG,GAAN;AACH;;AAED,MAAI,GAAG,GAAG,GAAV,EAAe;AACX,UAAM,IAAI,KAAJ,CAAU,8BAAV,CAAN;AACH;;AAED,SAAO,IAAI,CAAC,KAAL,CAAW,MAAM,CAAC,GAAD,EAAM,GAAN,CAAjB,CAAP;AAEH;;AAED,IAAI,GAAG,GAAG,UAAV;;AAEA,IAAI,CAAC,IAAL,GAAY,IAAI,CAAC,IAAL,IAAa,UAAU,CAAV,EAAa;AAClC,SAAO,IAAI,CAAC,GAAL,CAAS,CAAT,IAAc,IAAI,CAAC,GAAL,CAAS,CAAT,CAArB;AAC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O,KAAK,EAAZ;AACH;;;;EAfY,mBAAQ,KAAR,CAAc,M;;;;AAmB/B,mBAAQ,iBAAR,CAA0B,eAA1B,EAA2C,EAA3C;;;;;ACxDA;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;AAEA;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,WAAT,CAAqB,KAArB,EAA4B;AACxB,MAAI,IAAJ;;AAEA,MAAI,KAAK,KAAK,SAAV,IAAuB,KAAK,KAAK,IAArC,EAA2C;AACvC,WAAO,IAAP;AACH;;AAED,EAAA,IAAI,WAAU,KAAV,CAAJ;;AAEA,MAAI,IAAI,KAAK,QAAT,IAAqB,IAAI,KAAK,QAA9B,IAA0C,IAAI,KAAK,SAAnD,IAAgE,IAAI,KAAK,QAA7E,EAAuF;AACnF,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,SAAT,CAAmB,KAAnB,EAA0B;AAEtB,MAAI,KAAK,KAAK,IAAV,IAAkB,KAAK,KAAK,KAAhC,EAAuC;AACnC,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,QAAT,CAAkB,KAAlB,EAAyB;AACrB,MAAI,KAAK,KAAK,SAAV,IAAuB,OAAO,KAAP,KAAiB,QAA5C,EAAsD;AAClD,WAAO,KAAP;AACH;;AACD,SAAO,IAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,QAAT,CAAkB,KAAlB,EAAyB;AAErB,MAAI,OAAO,CAAC,KAAD,CAAX,EAAoB,OAAO,KAAP;AACpB,MAAI,WAAW,CAAC,KAAD,CAAf,EAAwB,OAAO,KAAP;;AAExB,MAAI,QAAO,KAAP,MAAiB,QAArB,EAA+B;AAC3B,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,OAAT,CAAiB,KAAjB,EAAwB;AACpB,MAAI,KAAK,CAAC,OAAN,CAAc,KAAd,CAAJ,EAA0B;AACtB,WAAO,IAAP;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,UAAT,CAAoB,KAApB,EAA2B;AACvB,MAAI,OAAO,CAAC,KAAD,CAAX,EAAoB,OAAO,KAAP;AACpB,MAAI,WAAW,CAAC,KAAD,CAAf,EAAwB,OAAO,KAAP;;AAExB,MAAI,OAAO,KAAP,KAAiB,UAArB,EAAiC;AAC7B,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AAEH;;AAED,mBAAQ,iBAAR,CAA0B,eAA1B,EAA2C,WAA3C,EAAwD,SAAxD,EAAmE,QAAnE,EAA6E,QAA7E,EAAuF,OAAvF,EAAgG,UAAhG;;;AC1PA;AAEA;AACA;AACA;;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;AACrB,UAAM,IAAI,SAAJ,CAAc,0BAAd,CAAN;AACH;AACJ;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,eAAT,CAAyB,KAAzB,EAAgC;AAC5B,MAAI,CAAC,mBAAU,KAAV,CAAL,EAAuB;AACnB,UAAM,IAAI,SAAJ,CAAc,wBAAd,CAAN;AACH;AACJ;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,cAAT,CAAwB,KAAxB,EAA+B;AAC3B,MAAI,CAAC,kBAAS,KAAT,CAAL,EAAsB;AAClB,UAAM,IAAI,SAAJ,CAAc,uBAAd,CAAN;AACH;AACJ;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,cAAT,CAAwB,KAAxB,EAA+B;AAC3B,MAAI,CAAC,kBAAS,KAAT,CAAL,EAAsB;AAClB,UAAM,IAAI,SAAJ,CAAc,uBAAd,CAAN;AACH;AACJ;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,aAAT,CAAuB,KAAvB,EAA8B;AAC1B,MAAI,CAAC,iBAAQ,KAAR,CAAL,EAAqB;AACjB,UAAM,IAAI,SAAJ,CAAc,0BAAd,CAAN;AACH;AACJ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AAI,KAAK,QAA9B,IAA0C,IAAI,KAAK,SAAnD,IAAgE,IAAI,KAAK,QAA7E,EAAuF;AACnF,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,SAAT,CAAmB,KAAnB,EAA0B;AAEtB,MAAI,KAAK,KAAK,IAAV,IAAkB,KAAK,KAAK,KAAhC,EAAuC;AACnC,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,QAAT,CAAkB,KAAlB,EAAyB;AACrB,MAAI,KAAK,KAAK,SAAV,IAAuB,OAAO,KAAP,KAAiB,QAA5C,EAAsD;AAClD,WAAO,KAAP;AACH;;AACD,SAAO,IAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,QAAT,CAAkB,KAAlB,EAAyB;AAErB,MAAI,OAAO,CAAC,KAAD,CAAX,EAAoB,OAAO,KAAP;AACpB,MAAI,WAAW,CAAC,KAAD,CAAf,EAAwB,OAAO,KAAP;;AAExB,MAAI,QAAO,KAAP,MAAiB,QAArB,EAA+B;AAC3B,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,OAAT,CAAiB,KAAjB,EAAwB;AACpB,MAAI,KAAK,CAAC,OAAN,CAAc,KAAd,CAAJ,EAA0B;AACtB,WAAO,IAAP;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,UAAT,CAAoB,KAApB,EAA2B;AACvB,MAAI,OAAO,CAAC,KAAD,CAAX,EAAoB,OAAO,KAAP;AACpB,MAAI,WAAW,CAAC,KAAD,CAAf,EAAwB,OAAO,KAAP;;AAExB,MAAI,OAAO,KAAP,KAAiB,UAArB,EAAiC;AAC7B,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AAEH;;AAED,mBAAQ,iBAAR,CAA0B,eAA1B,EAA2C,WAA3C,EAAwD,SAAxD,EAAmE,QAAnE,EAA6E,QAA7E,EAAuF,OAAvF,EAAgG,UAAhG;;;AC1PA;AAEA;AACA;AACA;;;;;;;;;;;;;AAEA;;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,O;AAEF;AACJ;AACA;AACI,oBAAc;AAAA;AACb;AAED;AACJ;AACA;AACA;;;;;WACI,oBAAW;AACP,aAAO,IAAI,CAAC,SAAL,CAAe,IAAf,CAAP;AACH;;;;;;;;AAKL,mBAAQ,iBAAR,CAA0B,eAA1B,EAA2C,OAA3C;;;ACvDA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AkB,MAAlB,CAAyB,OAAzB,CAAb;AACH;;AAED,aAAO,OAAO,CAAC,GAAR,CAAY,OAAZ,CAAP;AACH;;;;EA9CsB,mBAAQ,KAAR,CAAc,M;AAkDzC;AACA;AACA;AACA;AACA;AACA;;;;;AACA,SAAS,eAAT,CAAyB,QAAzB,EAAmC;AAC/B,MAAI,EAAE,QAAQ,YAAY,mBAAQ,KAAR,CAAc,QAApC,CAAJ,EAAmD;AAC/C,UAAM,IAAI,KAAJ,CAAU,uCAAV,CAAN;AACH;;AACD,SAAO,IAAP;AACH;;AAED,mBAAQ,iBAAR,CAA0B,eAA1B,EAA2C,YAA3C;;;ACnGA;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;AAEA;;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,iBAAT,CAA2B,KAA3B,EAAkC;AAC9B,MAAI,CAAC,qBAAY,KAAZ,CAAL,EAAyB;AACrB,UAAM,IAAI,SAAJ,CAAc,0BAAd,CAAN;AACH;AACJ;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,eAAT,CAAyB,KAAzB,EAAgC;AAC5B,MAAI,CAAC,mBAAU,KAAV,CAAL,EAAuB;AACnB,UAAM,IAAI,SAAJ,CAAc,wBAAd,CAAN;AACH;AACJ;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,cAAT,CAAwB,KAAxB,EAA+B;AAC3B,MAAI,CAAC,kBAAS,KAAT,CAAL,EAAsB;AAClB,UAAM,IAAI,SAAJ,CAAc,uBAAd,CAAN;AACH;AACJ;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,cAAT,CAAwB,KAAxB,EAA+B;AAC3B,MAAI,CAAC,kBAAS,KAAT,CAAL,EAAsB;AAClB,UAAM,IAAI,SAAJ,CAAc,uBAAd,CAAN;AACH;AACJ;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,aAAT,CAAuB,KAAvB,EAA8B;AAC1B,MAAI,CAAC,iBAAQ,KAAR,CAAL,EAAqB;AACjB,UAAM,IAAI,SAAJ,CAAc,0BAAd,CAAN;AACH;AACJ;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,gBAAT,CAA0B,KAA1B,EAAiC;AAC7B,MAAI,CAAC,oBAAW,KAAX,CAAL,EAAwB;AACpB,UAAM,IAAI,SAAJ,CAAc,yBAAd,CAAN;AACH;AACJ;;AAED,mBAAQ,iBAAR,CAA0B,eAA1B,EAA2C,iBAA3C,EAA8D,eAA9D,EAA+E,cAA/E,EAA+F,cAA/F,EAA+G,aAA/G,EAA8H,gBAA9H;;;AC7OA;;;;;;;;;;;;;;;;AAEA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,UAAT,CAAoB,MAApB,EAA4B;AAExB,gCAAe,MAAf,EAFwB,CAIxB;;AACA,MAAI,SAAS,GAAG,MAAM,CAAC,mBAAP,CAA2B,MAA3B,CAAhB,CALwB,CAOxB;;AAPwB,6CAQP,SARO;AAAA;;AAAA;AAQxB,wDAA4B;AAAA,UAAnB,IAAmB;AACxB,UAAI,KAAK,GAAG,MAAM,CAAC,IAAD,CAAlB;AAEA,MAAA,MAAM,CAAC,IAAD,CAAN,GAAe,KAAK,IAAI,QAAO,KAAP,MAAiB,QAA1B,GACX,UAAU,CAAC,KAAD,CADC,GACS,KADxB;AAEH;AAbuB;AAAA;AAAA;AAAA;AAAA;;AAexB,SAAO,MAAM,CAAC,MAAP,CAAc,MAAd,CAAP;AACH;;AAED,mBAAQ,iBAAR,CAA0B,cAA1B,EAA0C,UAA1C", "file": "generated.js", "sourceRoot": "", "sourcesContent": [ "(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()", - "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\n\n\n/**\n * this function uses crypt and returns a random number.\n *\n * you can call the method via the monster namespace `Monster.Math.random()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/math/random.js';\n * console.log(Monster.Math.random(1,10)) // ↦ 5\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/math/random.js';\n * console.log(random(1,10)) // ↦ 5\n * </script>\n * ```\n *\n * @param {number} min starting value of the definition set (default is 0)\n * @param {number} max end value of the definition set (default is 1000000000)\n * @returns {number}\n * @memberOf Monster/Math\n\n * @since 1.0.0\n * @copyright schukai GmbH\n */\nfunction random(min, max) {\n\n if (min === undefined) {\n min = 0;\n }\n if (max === undefined) {\n max = MAX;\n }\n\n if (max < min) {\n throw new Error(\"max must be greater than min\");\n }\n\n return Math.round(create(min, max));\n\n}\n\nvar MAX = 1000000000;\n\nMath.log2 = Math.log2 || function (n) {\n return Math.log(n) / Math.log(2);\n};\n\n/**\n *\n * @param min\n * @param max\n * @returns {*}\n * @private\n */\nfunction create(min, max) {\n var crypt;\n\n if (typeof global !== \"undefined\") {\n crypt = global?.['crypto'] || global?.['msCrypto'];\n } else {\n crypt = typeof crypto !== \"undefined\" ? crypto : undefined;\n }\n\n if (typeof crypt === \"undefined\") {\n throw new Error(\"missing crypt\")\n }\n\n let rval = 0;\n const range = max - min;\n if (range < 2) {\n return min;\n }\n\n const bitsNeeded = Math.ceil(Math.log2(range));\n if (bitsNeeded > 53) {\n throw new Error(\"we cannot generate numbers larger than 53 bits.\");\n }\n const bytesNeeded = Math.ceil(bitsNeeded / 8);\n const mask = Math.pow(2, bitsNeeded) - 1;\n\n const byteArray = new Uint8Array(bytesNeeded);\n crypt.getRandomValues(byteArray);\n\n let p = (bytesNeeded - 1) * 8;\n for (var i = 0; i < bytesNeeded; i++) {\n rval += byteArray[i] * Math.pow(2, p);\n p -= 8;\n }\n\n rval = rval & mask;\n\n if (rval >= range) {\n return create(min, max);\n }\n\n return min + rval;\n\n}\n\nMonster.assignToNamespace('Monster.Math', random);\nexport {Monster, random}\n\n\n\n\n", + "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\n\n\n/**\n * this function uses crypt and returns a random number.\n *\n * you can call the method via the monster namespace `Monster.Math.random()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/math/random.js';\n * console.log(Monster.Math.random(1,10)) // ↦ 5\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/math/random.js';\n * console.log(random(1,10)) // ↦ 5\n * </script>\n * ```\n *\n * @param {number} min starting value of the definition set (default is 0)\n * @param {number} max end value of the definition set (default is 1000000000)\n * @returns {number}\n * @memberOf Monster/Math\n\n * @since 1.0.0\n * @copyright schukai GmbH\n */\nfunction random(min, max) {\n\n if (min === undefined) {\n min = 0;\n }\n if (max === undefined) {\n max = MAX;\n }\n\n if (max < min) {\n throw new Error(\"max must be greater than min\");\n }\n\n return Math.round(create(min, max));\n\n}\n\nvar MAX = 1000000000;\n\nMath.log2 = Math.log2 || function (n) {\n return Math.log(n) / Math.log(2);\n};\n\n/**\n *\n * @param min\n * @param max\n * @returns {*}\n * @private\n */\nfunction create(min, max) {\n var crypt;\n\n if (typeof global !== \"undefined\") {\n crypt = global?.['crypto'] || global?.['msCrypto'];\n } else {\n crypt = typeof crypto !== \"undefined\" ? crypto : undefined;\n }\n\n if (typeof crypt === \"undefined\") {\n throw new Error(\"missing crypt\")\n }\n\n let rval = 0;\n const range = max - min;\n if (range < 2) {\n return min;\n }\n\n const bitsNeeded = Math.ceil(Math.log2(range));\n if (bitsNeeded > 53) {\n throw new Error(\"we cannot generate numbers larger than 53 bits.\");\n }\n const bytesNeeded = Math.ceil(bitsNeeded / 8);\n const mask = Math.pow(2, bitsNeeded) - 1;\n\n const byteArray = new Uint8Array(bytesNeeded);\n crypt.getRandomValues(byteArray);\n\n let p = (bytesNeeded - 1) * 8;\n for (var i = 0; i < bytesNeeded; i++) {\n rval += byteArray[i] * Math.pow(2, p);\n p -= 8;\n }\n\n rval = rval & mask;\n\n if (rval >= range) {\n return create(min, max);\n }\n\n return min + rval;\n\n}\n\nMonster.assignToNamespace('Monster.Math', random);\nexport {Monster, random}\n\n\n\n\n", "/**\n * @license\n * Copyright 2021 schukai GmbH\n * SPDX-License-Identifier: AGPL-3.0-only or COMMERCIAL\n * @author schukai GmbH\n */\n\n'use strict';\n\nimport {Monster} from './namespace.js';\nimport './types/id.js';\nimport './types/is.js';\nimport './types/object.js';\nimport './types/version.js';\nimport './types/observer.js';\nimport './types/observerlist.js';\nimport './types/validate.js';\nimport './math/random.js';\nimport './util/clone.js';\nimport './util/freeze.js';\n\nMonster.Util.deepFreeze(Monster);\nexport {Monster};", - "'use strict';\n\n/**\n * @namespace Monster\n * @author schukai GmbH\n */\n\n\n/**\n * Namespace class objects form the basic framework of the namespace administration.\n *\n * All functions, classes and objects of the library hang within the namespace tree.\n *\n * Via `obj instanceof Monster.Namespace` it is also easy to check whether it is an object or a namespace.\n *\n * @memberOf Monster\n \n * @copyright schukai GmbH\n * @since 1.0.0\n */\nclass Namespace {\n\n /**\n *\n * @param namespace\n * @param obj\n */\n constructor(namespace) {\n if (namespace === undefined || typeof namespace !== 'string') {\n throw new Error(\"namespace is not a string\")\n }\n this.namespace = namespace;\n }\n\n /**\n *\n * @returns {string}\n */\n getNamespace() {\n return this.namespace;\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return this.getNamespace();\n }\n}\n\n/**\n *\n * @type {Namespace}\n * @global\n */\nexport const Monster = new Namespace(\"Monster\");\n\n\n/**\n *\n */\nassignToNamespace('Monster', assignToNamespace);\n\n/**\n * To expand monster, the `Monster.assignToNamespace()` method can be used. \n *\n * you must call the method in the monster namespace. this allows you to mount your own classes, objects and functions into the namespace.\n * \n * To avoid confusion and so that you do not accidentally overwrite existing functions, you should use the custom namespace `X`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/namespace.js';\n * function hello() {\n * console.log('Hello World!');\n * }\n * Monster.assignToNamespace(\"Monster.X\",hello)\n * Monster.X.hello(); // ↦ Hello World!\n * </script>\n * \n * ```\n *\n * @param ns\n * @param obj\n * @memberOf Monster\n \n */\nfunction assignToNamespace(ns, ...obj) {\n let current = namespaceFor(ns.split(\".\"));\n\n for (let i = 0, l = obj.length; i < l; i++) {\n current[objectName(obj[i])] = obj[i];\n }\n}\n\n/**\n *\n * @param fn\n * @returns {string|*}\n * @private\n */\nfunction objectName(fn) {\n try {\n\n if (typeof fn !== 'function') {\n throw new Error(\"the first argument is not a function or class.\");\n }\n\n if (fn.hasOwnProperty('name')) {\n return fn.name;\n }\n\n if (\"function\" === typeof fn.toString) {\n let s = fn.toString();\n let f = s.match(/^\\s*function\\s+([^\\s(]+)/);\n if (Array.isArray(f) && typeof f[1] === 'string') {\n return f[1];\n }\n let c = s.match(/^\\s*class\\s+([^\\s(]+)/);\n if (Array.isArray(c) && typeof c[1] === 'string') {\n return c[1];\n }\n }\n\n } catch (e) {\n throw new Error(\"exception \" + e);\n }\n\n throw new Error(\"the name of the class or function cannot be resolved.\");\n}\n\n/**\n *\n * @param parts\n * @returns {Namespace}\n * @private\n */\nfunction namespaceFor(parts) {\n var space = Monster, ns = 'Monster';\n\n for (let i = 0; i < parts.length; i++) {\n\n if (\"Monster\" === parts[i]) {\n continue;\n }\n\n ns += '.' + parts[i];\n\n if (!space.hasOwnProperty(parts[i])) {\n space[parts[i]] = new Namespace(ns);\n }\n\n space = space[parts[i]];\n }\n\n return space;\n}\n\n\nexport {assignToNamespace}\n", - "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport '../types/object.js';\n\nlet internalCounter = 0;\n\n/**\n *\n * you can call the method via the monster namespace `new Monster.Types.ID()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/id.js';\n * console.log(new Monster.Types.ID())\n * console.log(new Monster.Types.ID())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/id.js';\n * console.log(new ID())\n * console.log(new ID())\n * </script>\n * ```\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass ID extends Monster.Types.Object {\n\n constructor() {\n super();\n\n internalCounter += 1;\n\n this.id = global.btoa(Monster.Math.random(1, 10000))\n .replace(/=/g, '')\n /** No numbers at the beginning of the ID, because of possible problems with DOM */\n .replace(/^[0-9]+/, 'X') + internalCounter;\n }\n\n toString() {\n return this.id;\n }\n\n}\n\nMonster.assignToNamespace('Monster.Types', ID);\nexport {Monster, ID}\n", - "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\n\n/**\n * checks whether the value passed is a primitive (string, number, boolean or symbol)\n *\n * you can call the method via the monster namespace `Monster.Types.isPrimitive()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js';\n * console.log(Monster.Types.isPrimitive('2')) // ↦ false\n * console.log(Monster.Types.isPrimitive([])) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js';\n * console.log(isPrimitive('2')) // ↦ true\n * console.log(isPrimitive([])) // ↦ false\n * </script>\n * ```\n * \n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isPrimitive(value) {\n var type;\n\n if (value === undefined || value === null) {\n return true;\n }\n\n type = typeof value;\n\n if (type === 'string' || type === 'number' || type === 'boolean' || type === 'symbol') {\n return true;\n }\n\n return false;\n}\n\n/**\n * checks whether the value passed is a boolean\n *\n * you can call the method via the monster namespace `Monster.Types.isBoolean()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js';\n * console.log(Monster.Types.isBoolean('2')) // ↦ false\n * console.log(Monster.Types.isBoolean([])) // ↦ false\n * console.log(Monster.Types.isBoolean(true)) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js';\n * console.log(isBoolean('2')) // ↦ false\n * console.log(isBoolean([])) // ↦ false\n * console.log(isBoolean(2>4)) // ↦ true\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isBoolean(value) {\n\n if (value === true || value === false) {\n return true;\n }\n\n return false;\n}\n\n/**\n * checks whether the value passed is a string\n * \n * you can call the method via the monster namespace `Monster.Types.isString()`.\n * \n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js';\n * console.log(Monster.Types.isString('2')) // ↦ true\n * console.log(Monster.Types.isString([])) // ↦ false\n * </script>\n * ```\n * \n * Alternatively, you can also integrate this function individually.\n * \n * ```\n * <script type=\"module\">\n * import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js';\n * console.log(isString('2')) // ↦ true\n * console.log(isString([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isString(value) {\n if (value === undefined || typeof value !== 'string') {\n return false;\n }\n return true;\n}\n\n/**\n * checks whether the value passed is a object\n *\n * you can call the method via the monster namespace `Monster.Types.isObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js';\n * console.log(Monster.Types.isObject('2')) // ↦ false\n * console.log(Monster.Types.isObject([])) // ↦ false\n * console.log(Monster.Types.isObject({})) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js';\n * console.log(isObject('2')) // ↦ false\n * console.log(isObject([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isObject(value) {\n\n if (isArray(value)) return false;\n if (isPrimitive(value)) return false;\n\n if (typeof value === 'object') {\n return true;\n }\n\n return false;\n}\n\n/**\n * checks whether the value passed is a array\n *\n * you can call the method via the monster namespace `Monster.Types.isArray()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js';\n * console.log(Monster.Types.isArray('2')) // ↦ false\n * console.log(Monster.Types.isArray([])) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js';\n * console.log(isArray('2')) // ↦ false\n * console.log(isArray([])) // ↦ true\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isArray(value) {\n if (Array.isArray(value)) {\n return true;\n }\n return false;\n}\n\n/**\n * checks whether the value passed is a function\n *\n * you can call the method via the monster namespace `Monster.Types.isFunction()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js';\n * console.log(Monster.Types.isFunction(()=>{})) // ↦ true\n * console.log(Monster.Types.isFunction('2')) // ↦ false\n * console.log(Monster.Types.isFunction([])) // ↦ false\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js';\n * console.log(isFunction(()=>{})) // ↦ true\n * console.log(isFunction('2')) // ↦ false\n * console.log(isFunction([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isFunction(value) {\n if (isArray(value)) return false;\n if (isPrimitive(value)) return false;\n\n if (typeof value === 'function') {\n return true;\n }\n\n return false;\n\n}\n\nMonster.assignToNamespace('Monster.Types', isPrimitive, isBoolean, isString, isObject, isArray, isFunction);\nexport {Monster, isPrimitive, isBoolean, isString, isObject, isArray, isFunction}\n", - "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\n\n\n/**\n * This is the base class from which all monster classes are derived.\n *\n * you can call the method via the monster namespace `new Monster.Types.Object()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/object.js';\n * console.log(new Monster.Types.Object())\n * console.log(new Monster.Types.Object())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Object} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/object.js';\n * console.log(new Object())\n * console.log(new Object())\n * </script>\n * ```\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Object {\n\n /**\n *\n */\n constructor() {\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return JSON.stringify(this);\n };\n\n\n}\n\nMonster.assignToNamespace('Monster.Types', Object);\nexport {Monster, Object}\n", - "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport '../types/object.js';\n\n/**\n * an observer manages a callback function\n *\n * you can call the method via the monster namespace `new Monster.Types.Observer()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observer.js';\n * console.log(new Monster.Types.Observer())\n * console.log(new Monster.Types.Observer())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observer.js';\n * console.log(Observer())\n * console.log(Observer())\n * </script>\n * ```\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Observer extends Monster.Types.Object {\n\n constructor(callback, ...args) {\n super();\n\n if (typeof callback !== 'function') {\n throw new Error(\"observer callback must be a function\")\n }\n\n this.callback = callback;\n this.arguments = args;\n this.tags = new Set;\n }\n\n addTag(tag) {\n this.tags.add(tag);\n return this;\n }\n\n removeTag(tag) {\n this.tags.delete(tag);\n return this;\n }\n\n getTags() {\n return this.tags\n }\n\n hasTag(tag) {\n return this.tags.has(tag)\n }\n\n update(subject) {\n let self = this;\n\n return new Promise(function (resolve, reject) {\n if (!(subject instanceof Object)) {\n reject(\"subject must be an object\");\n }\n let result = self.callback.apply(subject, self.arguments);\n resolve(result);\n\n });\n\n };\n\n}\n\nMonster.assignToNamespace('Monster.Types', Observer);\nexport {Monster, Observer}\n\n\n\n", - "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport '../types/object.js';\n\n/**\n * With the help of the ObserverList class, observer can be managed.\n *\n * you can call the method via the monster namespace `new Monster.Types.ObserverList()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observerlist.js';\n * console.log(new Monster.Types.ObserverList()) \n * console.log(new Monster.Types.ObserverList()) \n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observerlist.js';\n * console.log(ObserverList())\n * console.log(ObserverList())\n * </script>\n * ```\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass ObserverList extends Monster.Types.Object {\n\n constructor() {\n super();\n this.observers = [];\n }\n\n attach(observer) {\n checkIsObserver(observer);\n this.observers.push(observer);\n return this;\n };\n\n detach(observer) {\n checkIsObserver(observer);\n var i = 0, l = this.observers.length;\n for (; i < l; i++) {\n if (this.observers[i] === observer) {\n this.observers.splice(i, 1);\n }\n }\n\n return this;\n };\n\n contains(observer) {\n checkIsObserver(observer);\n var i = 0, l = this.observers.length;\n for (; i < l; i++) {\n if (this.observers[i] === observer) {\n return true;\n }\n }\n return false;\n };\n\n notify(subject) {\n\n let pomises = []\n\n var i = 0, l = this.observers.length;\n for (; i < l; i++) {\n pomises.push(this.observers[i].update(subject));\n }\n\n return Promise.all(pomises);\n };\n\n}\n\n/**\n * \n * @param {Monster.Types.Observer} observer\n * @returns {boolean}\n * @private\n */\nfunction checkIsObserver(observer) {\n if (!(observer instanceof Monster.Types.Observer)) {\n throw new Error(\"argument must be instance of observer\")\n }\n return true;\n}\n\nMonster.assignToNamespace('Monster.Types', ObserverList);\nexport {Monster, ObserverList}\n", - "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport {isPrimitive, isBoolean, isString, isObject, isArray, isFunction} from '../types/is.js';\n\n/**\n * this method checks if the type matches the primitive type. this function is identical to isPrimitive() except that a TypeError is thrown.\n *\n * you can call the method via the monster namespace `Monster.Types.validatePrimitive()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js';\n * console.log(Monster.Types.validatePrimitive('2')) // ↦ undefined\n * console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js';\n * console.log(validatePrimitive('2')) // ↦ undefined\n * console.log(validatePrimitive([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {undefined}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a primitive\n * @see {@link isPrimitive}\n * @see {@link Monster/Types/isPrimitive}\n * @see {@link Monster/Types#isPrimitive}\n */\nfunction validatePrimitive(value) {\n if (!isPrimitive(value)) {\n throw new TypeError('value is not a primitive')\n }\n}\n\n/**\n * this method checks if the type matches the boolean type. this function is identical to isBoolean() except that a TypeError is thrown.\n *\n * you can call the method via the monster namespace `Monster.Types.validateBoolean()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateBoolean(true)) // ↦ undefined\n * console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError\n * console.log(Monster.Types.validateBoolean([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js';\n * console.log(validateBoolean(false)) // ↦ undefined\n * console.log(validateBoolean('2')) // ↦ TypeError\n * console.log(validateBoolean([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {undefined}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n\n * @throws {TypeError} value is not primitive\n */\nfunction validateBoolean(value) {\n if (!isBoolean(value)) {\n throw new TypeError('value is not a boolean')\n }\n}\n\n/**\n * this method checks if the type matches the string type. this function is identical to isString() except that a TypeError is thrown.\n *\n * you can call the method via the monster namespace `Monster.Types.validateString()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateString('2')) // ↦ undefined\n * console.log(Monster.Types.validateString([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js';\n * console.log(validateString('2')) // ↦ undefined\n * console.log(validateString([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {undefined}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n\n * @throws {TypeError} value is not a string\n */\nfunction validateString(value) {\n if (!isString(value)) {\n throw new TypeError('value is not a string')\n }\n}\n\n\n/**\n * this method checks if the type matches the object type. this function is identical to isObject() except that a TypeError is thrown.\n *\n * you can call the method via the monster namespace `Monster.Types.validateObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateObject({})) // ↦ undefined\n * console.log(Monster.Types.validateObject('2')) // ↦ TypeError\n * console.log(Monster.Types.validateObject([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js';\n * console.log(validateObject({})) // ↦ undefined\n * console.log(validateObject('2')) // ↦ TypeError\n * console.log(validateObject([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {undefined}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a object\n */\nfunction validateObject(value) {\n if (!isObject(value)) {\n throw new TypeError('value is not a object')\n }\n}\n\n/**\n * this method checks if the type matches the array type. this function is identical to isArray() except that a TypeError is thrown.\n *\n * you can call the method via the monster namespace `Monster.Types.validateArray()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateArray('2')) // ↦ TypeError\n * console.log(Monster.Types.validateArray([])) // ↦ undefined\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js';\n * console.log(validateArray('2')) // ↦ TypeError\n * console.log(validateArray([])) // ↦ undefined\n * </script>\n * ```\n *\n * @param {*} value\n * @return {undefined}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a array\n */\nfunction validateArray(value) {\n if (!isArray(value)) {\n throw new TypeError('value is not not a array')\n }\n}\n\n/**\n * this method checks if the type matches the function type. this function is identical to isFunction() except that a TypeError is thrown.\n *\n * you can call the method via the monster namespace `Monster.Types.validateFunction()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateFunction(()=>{})) // ↦ undefined\n * console.log(Monster.Types.validateFunction('2')) // ↦ TypeError\n * console.log(Monster.Types.validateFunction([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js';\n * console.log(validateFunction(()=>{})) // ↦ undefined\n * console.log(validateFunction('2')) // ↦ TypeError\n * console.log(validateFunction([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {undefined}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a function\n */\nfunction validateFunction(value) {\n if (!isFunction(value)) {\n throw new TypeError('value is not a function')\n }\n}\n\nMonster.assignToNamespace('Monster.Types', validatePrimitive, validateBoolean, validateString, validateObject, validateArray, validateFunction);\nexport {Monster, validatePrimitive, validateBoolean, validateString, validateObject, validateArray, validateFunction}\n", - "'use strict';\n\nimport {Monster} from '../namespace.js';\nimport '../types/object.js';\n\n/**\n * the version object contains a sematic version number\n *\n * you can create the object via the monster namespace `new Monster.Types.Version()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js';\n * console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3\n * console.log(new Monster.Types.Version('1')) // ↦ 1.0.0\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this class individually.\n *\n * ```\n * <script type=\"module\">\n * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js';\n * console.log(new Version('1.2.3')) // ↦ 1.2.3\n * console.log(new Version('1')) // ↦ 1.0.0\n * </script>\n * ```\n *\n * some examples\n *\n * ```\n * new Monster.Types.Version('1.0.0') // 1.0.0\n * new Monster.Types.Version(1) // 1.0.0\n * new Monster.Types.Version(1, 0, 0) // 1.0.0\n * new Monster.Types.Version('1.2.3', 4, 5) // 1.4.5\n * ```\n *\n * @since 1.0.0\n * @author schukai GmbH\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Version extends Monster.Types.Object {\n\n /**\n *\n * @param major\n * @param minor\n * @param patch\n * @throws major is not a number\n * @throws minor is not a number\n * @throws patch is not a number\n */\n constructor(major, minor, patch) {\n super();\n\n if (typeof major === 'string' && minor === undefined && patch === undefined) {\n\n let parts = major.toString().split('.');\n major = parseInt(parts[0] || 0);\n minor = parseInt(parts[1] || 0);\n patch = parseInt(parts[2] || 0);\n }\n\n if (major === undefined) {\n throw new Error(\"major version is undefined\");\n }\n\n if (minor === undefined) {\n minor = 0;\n }\n\n if (patch === undefined) {\n patch = 0;\n }\n\n this.major = parseInt(major);\n this.minor = parseInt(minor);\n this.patch = parseInt(patch);\n\n if (isNaN(this.major)) {\n throw new Error(\"major is not a number\");\n }\n\n if (isNaN(this.minor)) {\n throw new Error(\"minor is not a number\");\n }\n\n if (isNaN(this.patch)) {\n throw new Error(\"patch is not a number\");\n }\n\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return this.major + '.' + this.minor + '.' + this.patch;\n }\n\n /**\n * returns 0 if equal, -1 if the object version is less and 1 if greater\n * then the compared version\n *\n * @param {string|Version} version Version to compare\n * @returns {number}\n */\n compareTo(version) {\n\n if (version instanceof Version) {\n version = version.toString();\n }\n\n if (typeof version !== 'string') {\n throw new Error(\"type exception\");\n }\n\n if (version === this.toString()) {\n return 0;\n }\n\n let a = [this.major, this.minor, this.patch];\n let b = version.split('.');\n let len = Math.max(a.length, b.length);\n\n for (let i = 0; i < len; i += 1) {\n if ((a[i] && !b[i] && parseInt(a[i]) > 0) || (parseInt(a[i]) > parseInt(b[i]))) {\n return 1;\n } else if ((b[i] && !a[i] && parseInt(b[i]) > 0) || (parseInt(a[i]) < parseInt(b[i]))) {\n return -1;\n }\n }\n\n return 0;\n };\n\n}\n\nMonster.assignToNamespace('Monster.Types', Version);\n\n\nlet monsterVersion;\n\n/**\n * Version of monster\n *\n * you can call the method via the monster namespace `Monster.getVersion()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js';\n * console.log(Monster.getVersion())\n * console.log(Monster.getVersion())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js';\n * console.log(getVersion())\n * console.log(getVersion())\n * </script>\n * ```\n *\n * @returns {Monster.Types.Version}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @author schukai GmbH\n * @memberOf Monster\n */\nfunction getVersion() {\n if (monsterVersion instanceof Version) {\n return monsterVersion;\n }\n /**#@+ dont touch, replaced by make with package.json version */\n monsterVersion = new Version('1.0.14')\n /**#@-*/\n return monsterVersion;\n\n}\n\nMonster.assignToNamespace('Monster', getVersion);\nexport {Monster, Version, getVersion}\n", - "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport {isObject, isFunction, isPrimitive, isArray} from '../types/is.js';\n\n\n/**\n * with this function, objects can be cloned.\n * the entire object tree is run through.\n *\n * Proxy, Element, HTMLDocument and DocumentFragment instances are not cloned.\n * Global objects such as windows are also not cloned,\n *\n * If an object has a method `getClone()`, this method is used to create the clone.\n *\n * you can call the method via the monster namespace `Monster.Util.clone()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/clone.js';\n * console.log(Monster.Util.clone({}))\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/clone.js';\n * console.log(clone({}))\n * </script>\n * ```\n *\n *\n * @param {*} obj object to be cloned\n * @returns {*}\n *\n * @since 1.0.0\n * @memberOf Monster/Util\n * @copyright schukai GmbH\n * @throws {Error} unable to clone obj! its type isn't supported.\n */\nfunction clone(obj) {\n\n // typeof null results in 'object'. https://2ality.com/2013/10/typeof-null.html\n if (null === obj) {\n return obj;\n }\n\n // Handle the two simple types, null and undefined\n if (isPrimitive(obj)) {\n return obj;\n }\n \n // Handle the two simple types, null and undefined\n if (isFunction(obj)) {\n return obj;\n }\n\n // Handle Array\n if (isArray(obj)) {\n let copy = [];\n for (var i = 0, len = obj.length; i < len; i++) {\n copy[i] = clone(obj[i]);\n }\n\n return copy;\n }\n\n if (isObject(obj)) {\n\n\n // Handle Date\n if (obj instanceof Date) {\n let copy = new Date();\n copy.setTime(obj.getTime());\n return copy;\n }\n\n /** Do not clone DOM nodes */\n if (typeof Element !== 'undefined' && obj instanceof Element) return obj;\n if (typeof HTMLDocument !== 'undefined' && obj instanceof HTMLDocument) return obj;\n if (typeof DocumentFragment !== 'undefined' && obj instanceof DocumentFragment) return obj;\n\n /** Do not clone global objects */\n if (typeof globalContext !== 'undefined' && obj === globalContext) return obj;\n if (typeof window !== 'undefined' && obj === window) return obj;\n if (typeof document !== 'undefined' && obj === document) return obj;\n if (typeof navigator !== 'undefined' && obj === navigator) return obj;\n if (typeof JSON !== 'undefined' && obj === JSON) return obj;\n\n // Handle Proxy-Object\n try {\n // try/catch because possible: TypeError: Function has non-object prototype 'undefined' in instanceof check\n if (obj instanceof Proxy) {\n return obj;\n }\n } catch (e) {\n }\n\n return cloneObject(obj)\n\n }\n\n throw new Error(\"unable to clone obj! its type isn't supported.\");\n}\n\n/**\n *\n * @param {object} obj\n * @returns {object}\n * @private\n */\nfunction cloneObject(obj) {\n var copy;\n\n /** Object has clone method */\n if (typeof obj.hasOwnProperty('getClone') && obj.getClone === 'function') {\n return obj.getClone();\n }\n\n copy = {};\n if (typeof obj.constructor === 'function' &&\n typeof obj.constructor.call === 'function') {\n copy = new obj.constructor();\n }\n\n for (let key in obj) {\n\n if (!obj.hasOwnProperty(key)) {\n continue;\n }\n\n if (Monster.Types.isPrimitive(obj[key])) {\n copy[key] = obj[key];\n continue;\n }\n\n copy[key] = clone(obj[key]);\n }\n\n return copy;\n}\n\nMonster.assignToNamespace('Monster.Util', clone);\nexport {Monster, clone}\n", - "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport {validateObject} from '../types/validate.js';\n\n/**\n * deep freeze a object\n *\n * you can call the method via the monster namespace `Monster.Util.deepFreeze()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/freeze.js';\n * console.log(Monster.Util.deepFreeze({})) \n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/freeze.js';\n * console.log(deepFreeze({})) \n * </script>\n * ```\n *\n * @param {object} obj object to be freeze\n * @since 1.0.0\n * @returns {object}\n * @memberOf Monster/Util\n * @copyright schukai GmbH\n * @throws {TypeError} value is not a object\n */\nfunction deepFreeze(object) {\n \n validateObject(object)\n\n // Retrieve the defined property names of the object\n var propNames = Object.getOwnPropertyNames(object);\n\n // Freeze properties before freezing yourself\n for (let name of propNames) {\n let value = object[name];\n\n object[name] = value && typeof value === \"object\" ?\n deepFreeze(value) : value;\n }\n\n return Object.freeze(object);\n}\n\nMonster.assignToNamespace('Monster.Util', deepFreeze);\nexport {Monster, deepFreeze}\n" + "'use strict';\n\n/**\n * @namespace Monster\n * @author schukai GmbH\n */\n\n\n/**\n * Namespace class objects form the basic framework of the namespace administration.\n *\n * All functions, classes and objects of the library hang within the namespace tree.\n *\n * Via `obj instanceof Monster.Namespace` it is also easy to check whether it is an object or a namespace.\n *\n * @memberOf Monster\n \n * @copyright schukai GmbH\n * @since 1.0.0\n */\nclass Namespace {\n\n /**\n *\n * @param namespace\n * @param obj\n */\n constructor(namespace) {\n if (namespace === undefined || typeof namespace !== 'string') {\n throw new Error(\"namespace is not a string\")\n }\n this.namespace = namespace;\n }\n\n /**\n *\n * @returns {string}\n */\n getNamespace() {\n return this.namespace;\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return this.getNamespace();\n }\n}\n\n/**\n *\n * @type {Namespace}\n * @global\n */\nexport const Monster = new Namespace(\"Monster\");\n\n\n/**\n *\n */\nassignToNamespace('Monster', assignToNamespace);\n\n/**\n * To expand monster, the `Monster.assignToNamespace()` method can be used. \n *\n * you must call the method in the monster namespace. this allows you to mount your own classes, objects and functions into the namespace.\n * \n * To avoid confusion and so that you do not accidentally overwrite existing functions, you should use the custom namespace `X`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/namespace.js';\n * function hello() {\n * console.log('Hello World!');\n * }\n * Monster.assignToNamespace(\"Monster.X\",hello)\n * Monster.X.hello(); // ↦ Hello World!\n * </script>\n * \n * ```\n *\n * @param ns\n * @param obj\n * @memberOf Monster\n \n */\nfunction assignToNamespace(ns, ...obj) {\n let current = namespaceFor(ns.split(\".\"));\n\n for (let i = 0, l = obj.length; i < l; i++) {\n current[objectName(obj[i])] = obj[i];\n }\n}\n\n/**\n *\n * @param fn\n * @returns {string|*}\n * @private\n */\nfunction objectName(fn) {\n try {\n\n if (typeof fn !== 'function') {\n throw new Error(\"the first argument is not a function or class.\");\n }\n\n if (fn.hasOwnProperty('name')) {\n return fn.name;\n }\n\n if (\"function\" === typeof fn.toString) {\n let s = fn.toString();\n let f = s.match(/^\\s*function\\s+([^\\s(]+)/);\n if (Array.isArray(f) && typeof f[1] === 'string') {\n return f[1];\n }\n let c = s.match(/^\\s*class\\s+([^\\s(]+)/);\n if (Array.isArray(c) && typeof c[1] === 'string') {\n return c[1];\n }\n }\n\n } catch (e) {\n throw new Error(\"exception \" + e);\n }\n\n throw new Error(\"the name of the class or function cannot be resolved.\");\n}\n\n/**\n *\n * @param parts\n * @returns {Namespace}\n * @private\n */\nfunction namespaceFor(parts) {\n var space = Monster, ns = 'Monster';\n\n for (let i = 0; i < parts.length; i++) {\n\n if (\"Monster\" === parts[i]) {\n continue;\n }\n\n ns += '.' + parts[i];\n\n if (!space.hasOwnProperty(parts[i])) {\n space[parts[i]] = new Namespace(ns);\n }\n\n space = space[parts[i]];\n }\n\n return space;\n}\n\n\nexport {assignToNamespace}\n", + "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport '../types/object.js';\n\nlet internalCounter = 0;\n\n/**\n *\n * you can call the method via the monster namespace `new Monster.Types.ID()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/id.js';\n * console.log(new Monster.Types.ID())\n * console.log(new Monster.Types.ID())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/id.js';\n * console.log(new ID())\n * console.log(new ID())\n * </script>\n * ```\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass ID extends Monster.Types.Object {\n\n constructor() {\n super();\n\n internalCounter += 1;\n\n this.id = global.btoa(Monster.Math.random(1, 10000))\n .replace(/=/g, '')\n /** No numbers at the beginning of the ID, because of possible problems with DOM */\n .replace(/^[0-9]+/, 'X') + internalCounter;\n }\n\n toString() {\n return this.id;\n }\n\n}\n\nMonster.assignToNamespace('Monster.Types', ID);\nexport {Monster, ID}\n", + "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\n\n/**\n * checks whether the value passed is a primitive (string, number, boolean or symbol)\n *\n * you can call the method via the monster namespace `Monster.Types.isPrimitive()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isPrimitive('2')) // ↦ false\n * console.log(Monster.Types.isPrimitive([])) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js';\n * console.log(isPrimitive('2')) // ↦ true\n * console.log(isPrimitive([])) // ↦ false\n * </script>\n * ```\n * \n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isPrimitive(value) {\n var type;\n\n if (value === undefined || value === null) {\n return true;\n }\n\n type = typeof value;\n\n if (type === 'string' || type === 'number' || type === 'boolean' || type === 'symbol') {\n return true;\n }\n\n return false;\n}\n\n/**\n * checks whether the value passed is a boolean\n *\n * you can call the method via the monster namespace `Monster.Types.isBoolean()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isBoolean('2')) // ↦ false\n * console.log(Monster.Types.isBoolean([])) // ↦ false\n * console.log(Monster.Types.isBoolean(true)) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js';\n * console.log(isBoolean('2')) // ↦ false\n * console.log(isBoolean([])) // ↦ false\n * console.log(isBoolean(2>4)) // ↦ true\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isBoolean(value) {\n\n if (value === true || value === false) {\n return true;\n }\n\n return false;\n}\n\n/**\n * checks whether the value passed is a string\n * \n * you can call the method via the monster namespace `Monster.Types.isString()`.\n * \n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isString('2')) // ↦ true\n * console.log(Monster.Types.isString([])) // ↦ false\n * </script>\n * ```\n * \n * Alternatively, you can also integrate this function individually.\n * \n * ```\n * <script type=\"module\">\n * import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js';\n * console.log(isString('2')) // ↦ true\n * console.log(isString([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isString(value) {\n if (value === undefined || typeof value !== 'string') {\n return false;\n }\n return true;\n}\n\n/**\n * checks whether the value passed is a object\n *\n * you can call the method via the monster namespace `Monster.Types.isObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isObject('2')) // ↦ false\n * console.log(Monster.Types.isObject([])) // ↦ false\n * console.log(Monster.Types.isObject({})) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js';\n * console.log(isObject('2')) // ↦ false\n * console.log(isObject([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isObject(value) {\n\n if (isArray(value)) return false;\n if (isPrimitive(value)) return false;\n\n if (typeof value === 'object') {\n return true;\n }\n\n return false;\n}\n\n/**\n * checks whether the value passed is a array\n *\n * you can call the method via the monster namespace `Monster.Types.isArray()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isArray('2')) // ↦ false\n * console.log(Monster.Types.isArray([])) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js';\n * console.log(isArray('2')) // ↦ false\n * console.log(isArray([])) // ↦ true\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isArray(value) {\n if (Array.isArray(value)) {\n return true;\n }\n return false;\n}\n\n/**\n * checks whether the value passed is a function\n *\n * you can call the method via the monster namespace `Monster.Types.isFunction()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isFunction(()=>{})) // ↦ true\n * console.log(Monster.Types.isFunction('2')) // ↦ false\n * console.log(Monster.Types.isFunction([])) // ↦ false\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js';\n * console.log(isFunction(()=>{})) // ↦ true\n * console.log(isFunction('2')) // ↦ false\n * console.log(isFunction([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isFunction(value) {\n if (isArray(value)) return false;\n if (isPrimitive(value)) return false;\n\n if (typeof value === 'function') {\n return true;\n }\n\n return false;\n\n}\n\nMonster.assignToNamespace('Monster.Types', isPrimitive, isBoolean, isString, isObject, isArray, isFunction);\nexport {Monster, isPrimitive, isBoolean, isString, isObject, isArray, isFunction}\n", + "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\n\n\n/**\n * This is the base class from which all monster classes are derived.\n *\n * you can call the method via the monster namespace `new Monster.Types.Object()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/object.js';\n * console.log(new Monster.Types.Object())\n * console.log(new Monster.Types.Object())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Object} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/object.js';\n * console.log(new Object())\n * console.log(new Object())\n * </script>\n * ```\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Object {\n\n /**\n *\n */\n constructor() {\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return JSON.stringify(this);\n };\n\n\n}\n\nMonster.assignToNamespace('Monster.Types', Object);\nexport {Monster, Object}\n", + "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport '../types/object.js';\n\n/**\n * an observer manages a callback function\n *\n * you can call the method via the monster namespace `new Monster.Types.Observer()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observer.js';\n * console.log(new Monster.Types.Observer())\n * console.log(new Monster.Types.Observer())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observer.js';\n * console.log(Observer())\n * console.log(Observer())\n * </script>\n * ```\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Observer extends Monster.Types.Object {\n\n constructor(callback, ...args) {\n super();\n\n if (typeof callback !== 'function') {\n throw new Error(\"observer callback must be a function\")\n }\n\n this.callback = callback;\n this.arguments = args;\n this.tags = new Set;\n }\n\n addTag(tag) {\n this.tags.add(tag);\n return this;\n }\n\n removeTag(tag) {\n this.tags.delete(tag);\n return this;\n }\n\n getTags() {\n return this.tags\n }\n\n hasTag(tag) {\n return this.tags.has(tag)\n }\n\n update(subject) {\n let self = this;\n\n return new Promise(function (resolve, reject) {\n if (!(subject instanceof Object)) {\n reject(\"subject must be an object\");\n }\n let result = self.callback.apply(subject, self.arguments);\n resolve(result);\n\n });\n\n };\n\n}\n\nMonster.assignToNamespace('Monster.Types', Observer);\nexport {Monster, Observer}\n\n\n\n", + "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport '../types/object.js';\n\n/**\n * With the help of the ObserverList class, observer can be managed.\n *\n * you can call the method via the monster namespace `new Monster.Types.ObserverList()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observerlist.js';\n * console.log(new Monster.Types.ObserverList()) \n * console.log(new Monster.Types.ObserverList()) \n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observerlist.js';\n * console.log(ObserverList())\n * console.log(ObserverList())\n * </script>\n * ```\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass ObserverList extends Monster.Types.Object {\n\n constructor() {\n super();\n this.observers = [];\n }\n\n attach(observer) {\n checkIsObserver(observer);\n this.observers.push(observer);\n return this;\n };\n\n detach(observer) {\n checkIsObserver(observer);\n var i = 0, l = this.observers.length;\n for (; i < l; i++) {\n if (this.observers[i] === observer) {\n this.observers.splice(i, 1);\n }\n }\n\n return this;\n };\n\n contains(observer) {\n checkIsObserver(observer);\n var i = 0, l = this.observers.length;\n for (; i < l; i++) {\n if (this.observers[i] === observer) {\n return true;\n }\n }\n return false;\n };\n\n notify(subject) {\n\n let pomises = []\n\n var i = 0, l = this.observers.length;\n for (; i < l; i++) {\n pomises.push(this.observers[i].update(subject));\n }\n\n return Promise.all(pomises);\n };\n\n}\n\n/**\n * \n * @param {Monster.Types.Observer} observer\n * @returns {boolean}\n * @private\n */\nfunction checkIsObserver(observer) {\n if (!(observer instanceof Monster.Types.Observer)) {\n throw new Error(\"argument must be instance of observer\")\n }\n return true;\n}\n\nMonster.assignToNamespace('Monster.Types', ObserverList);\nexport {Monster, ObserverList}\n", + "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport {isPrimitive, isBoolean, isString, isObject, isArray, isFunction} from '../types/is.js';\n\n/**\n * this method checks if the type matches the primitive type. this function is identical to isPrimitive() except that a TypeError is thrown.\n *\n * you can call the method via the monster namespace `Monster.Types.validatePrimitive()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validatePrimitive('2')) // ↦ undefined\n * console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js';\n * console.log(validatePrimitive('2')) // ↦ undefined\n * console.log(validatePrimitive([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {undefined}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a primitive\n * @see {@link isPrimitive}\n * @see {@link Monster/Types/isPrimitive}\n * @see {@link Monster/Types#isPrimitive}\n */\nfunction validatePrimitive(value) {\n if (!isPrimitive(value)) {\n throw new TypeError('value is not a primitive')\n }\n}\n\n/**\n * this method checks if the type matches the boolean type. this function is identical to isBoolean() except that a TypeError is thrown.\n *\n * you can call the method via the monster namespace `Monster.Types.validateBoolean()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateBoolean(true)) // ↦ undefined\n * console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError\n * console.log(Monster.Types.validateBoolean([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js';\n * console.log(validateBoolean(false)) // ↦ undefined\n * console.log(validateBoolean('2')) // ↦ TypeError\n * console.log(validateBoolean([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {undefined}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n\n * @throws {TypeError} value is not primitive\n */\nfunction validateBoolean(value) {\n if (!isBoolean(value)) {\n throw new TypeError('value is not a boolean')\n }\n}\n\n/**\n * this method checks if the type matches the string type. this function is identical to isString() except that a TypeError is thrown.\n *\n * you can call the method via the monster namespace `Monster.Types.validateString()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateString('2')) // ↦ undefined\n * console.log(Monster.Types.validateString([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js';\n * console.log(validateString('2')) // ↦ undefined\n * console.log(validateString([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {undefined}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n\n * @throws {TypeError} value is not a string\n */\nfunction validateString(value) {\n if (!isString(value)) {\n throw new TypeError('value is not a string')\n }\n}\n\n\n/**\n * this method checks if the type matches the object type. this function is identical to isObject() except that a TypeError is thrown.\n *\n * you can call the method via the monster namespace `Monster.Types.validateObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateObject({})) // ↦ undefined\n * console.log(Monster.Types.validateObject('2')) // ↦ TypeError\n * console.log(Monster.Types.validateObject([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js';\n * console.log(validateObject({})) // ↦ undefined\n * console.log(validateObject('2')) // ↦ TypeError\n * console.log(validateObject([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {undefined}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a object\n */\nfunction validateObject(value) {\n if (!isObject(value)) {\n throw new TypeError('value is not a object')\n }\n}\n\n/**\n * this method checks if the type matches the array type. this function is identical to isArray() except that a TypeError is thrown.\n *\n * you can call the method via the monster namespace `Monster.Types.validateArray()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateArray('2')) // ↦ TypeError\n * console.log(Monster.Types.validateArray([])) // ↦ undefined\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js';\n * console.log(validateArray('2')) // ↦ TypeError\n * console.log(validateArray([])) // ↦ undefined\n * </script>\n * ```\n *\n * @param {*} value\n * @return {undefined}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a array\n */\nfunction validateArray(value) {\n if (!isArray(value)) {\n throw new TypeError('value is not not a array')\n }\n}\n\n/**\n * this method checks if the type matches the function type. this function is identical to isFunction() except that a TypeError is thrown.\n *\n * you can call the method via the monster namespace `Monster.Types.validateFunction()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateFunction(()=>{})) // ↦ undefined\n * console.log(Monster.Types.validateFunction('2')) // ↦ TypeError\n * console.log(Monster.Types.validateFunction([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js';\n * console.log(validateFunction(()=>{})) // ↦ undefined\n * console.log(validateFunction('2')) // ↦ TypeError\n * console.log(validateFunction([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {undefined}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a function\n */\nfunction validateFunction(value) {\n if (!isFunction(value)) {\n throw new TypeError('value is not a function')\n }\n}\n\nMonster.assignToNamespace('Monster.Types', validatePrimitive, validateBoolean, validateString, validateObject, validateArray, validateFunction);\nexport {Monster, validatePrimitive, validateBoolean, validateString, validateObject, validateArray, validateFunction}\n", + "'use strict';\n\nimport {Monster} from '../namespace.js';\nimport '../types/object.js';\n\n/**\n * the version object contains a sematic version number\n *\n * you can create the object via the monster namespace `new Monster.Types.Version()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js';\n * console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3\n * console.log(new Monster.Types.Version('1')) // ↦ 1.0.0\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this class individually.\n *\n * ```\n * <script type=\"module\">\n * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js';\n * console.log(new Version('1.2.3')) // ↦ 1.2.3\n * console.log(new Version('1')) // ↦ 1.0.0\n * </script>\n * ```\n *\n * some examples\n *\n * ```\n * new Monster.Types.Version('1.0.0') // 1.0.0\n * new Monster.Types.Version(1) // 1.0.0\n * new Monster.Types.Version(1, 0, 0) // 1.0.0\n * new Monster.Types.Version('1.2.3', 4, 5) // 1.4.5\n * ```\n *\n * @since 1.0.0\n * @author schukai GmbH\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Version extends Monster.Types.Object {\n\n /**\n *\n * @param major\n * @param minor\n * @param patch\n * @throws major is not a number\n * @throws minor is not a number\n * @throws patch is not a number\n */\n constructor(major, minor, patch) {\n super();\n\n if (typeof major === 'string' && minor === undefined && patch === undefined) {\n\n let parts = major.toString().split('.');\n major = parseInt(parts[0] || 0);\n minor = parseInt(parts[1] || 0);\n patch = parseInt(parts[2] || 0);\n }\n\n if (major === undefined) {\n throw new Error(\"major version is undefined\");\n }\n\n if (minor === undefined) {\n minor = 0;\n }\n\n if (patch === undefined) {\n patch = 0;\n }\n\n this.major = parseInt(major);\n this.minor = parseInt(minor);\n this.patch = parseInt(patch);\n\n if (isNaN(this.major)) {\n throw new Error(\"major is not a number\");\n }\n\n if (isNaN(this.minor)) {\n throw new Error(\"minor is not a number\");\n }\n\n if (isNaN(this.patch)) {\n throw new Error(\"patch is not a number\");\n }\n\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return this.major + '.' + this.minor + '.' + this.patch;\n }\n\n /**\n * returns 0 if equal, -1 if the object version is less and 1 if greater\n * then the compared version\n *\n * @param {string|Version} version Version to compare\n * @returns {number}\n */\n compareTo(version) {\n\n if (version instanceof Version) {\n version = version.toString();\n }\n\n if (typeof version !== 'string') {\n throw new Error(\"type exception\");\n }\n\n if (version === this.toString()) {\n return 0;\n }\n\n let a = [this.major, this.minor, this.patch];\n let b = version.split('.');\n let len = Math.max(a.length, b.length);\n\n for (let i = 0; i < len; i += 1) {\n if ((a[i] && !b[i] && parseInt(a[i]) > 0) || (parseInt(a[i]) > parseInt(b[i]))) {\n return 1;\n } else if ((b[i] && !a[i] && parseInt(b[i]) > 0) || (parseInt(a[i]) < parseInt(b[i]))) {\n return -1;\n }\n }\n\n return 0;\n };\n\n}\n\nMonster.assignToNamespace('Monster.Types', Version);\n\n\nlet monsterVersion;\n\n/**\n * Version of monster\n *\n * you can call the method via the monster namespace `Monster.getVersion()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js';\n * console.log(Monster.getVersion())\n * console.log(Monster.getVersion())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js';\n * console.log(getVersion())\n * console.log(getVersion())\n * </script>\n * ```\n *\n * @returns {Monster.Types.Version}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @author schukai GmbH\n * @memberOf Monster\n */\nfunction getVersion() {\n if (monsterVersion instanceof Version) {\n return monsterVersion;\n }\n /**#@+ dont touch, replaced by make with package.json version */\n monsterVersion = new Version('1.1.0')\n /**#@-*/\n return monsterVersion;\n\n}\n\nMonster.assignToNamespace('Monster', getVersion);\nexport {Monster, Version, getVersion}\n", + "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport {isObject, isFunction, isPrimitive, isArray} from '../types/is.js';\n\n\n/**\n * with this function, objects can be cloned.\n * the entire object tree is run through.\n *\n * Proxy, Element, HTMLDocument and DocumentFragment instances are not cloned.\n * Global objects such as windows are also not cloned,\n *\n * If an object has a method `getClone()`, this method is used to create the clone.\n *\n * you can call the method via the monster namespace `Monster.Util.clone()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/clone.js';\n * console.log(Monster.Util.clone({}))\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/clone.js';\n * console.log(clone({}))\n * </script>\n * ```\n *\n *\n * @param {*} obj object to be cloned\n * @returns {*}\n *\n * @since 1.0.0\n * @memberOf Monster/Util\n * @copyright schukai GmbH\n * @throws {Error} unable to clone obj! its type isn't supported.\n */\nfunction clone(obj) {\n\n // typeof null results in 'object'. https://2ality.com/2013/10/typeof-null.html\n if (null === obj) {\n return obj;\n }\n\n // Handle the two simple types, null and undefined\n if (isPrimitive(obj)) {\n return obj;\n }\n \n // Handle the two simple types, null and undefined\n if (isFunction(obj)) {\n return obj;\n }\n\n // Handle Array\n if (isArray(obj)) {\n let copy = [];\n for (var i = 0, len = obj.length; i < len; i++) {\n copy[i] = clone(obj[i]);\n }\n\n return copy;\n }\n\n if (isObject(obj)) {\n\n\n // Handle Date\n if (obj instanceof Date) {\n let copy = new Date();\n copy.setTime(obj.getTime());\n return copy;\n }\n\n /** Do not clone DOM nodes */\n if (typeof Element !== 'undefined' && obj instanceof Element) return obj;\n if (typeof HTMLDocument !== 'undefined' && obj instanceof HTMLDocument) return obj;\n if (typeof DocumentFragment !== 'undefined' && obj instanceof DocumentFragment) return obj;\n\n /** Do not clone global objects */\n if (typeof globalContext !== 'undefined' && obj === globalContext) return obj;\n if (typeof window !== 'undefined' && obj === window) return obj;\n if (typeof document !== 'undefined' && obj === document) return obj;\n if (typeof navigator !== 'undefined' && obj === navigator) return obj;\n if (typeof JSON !== 'undefined' && obj === JSON) return obj;\n\n // Handle Proxy-Object\n try {\n // try/catch because possible: TypeError: Function has non-object prototype 'undefined' in instanceof check\n if (obj instanceof Proxy) {\n return obj;\n }\n } catch (e) {\n }\n\n return cloneObject(obj)\n\n }\n\n throw new Error(\"unable to clone obj! its type isn't supported.\");\n}\n\n/**\n *\n * @param {object} obj\n * @returns {object}\n * @private\n */\nfunction cloneObject(obj) {\n var copy;\n\n /** Object has clone method */\n if (typeof obj.hasOwnProperty('getClone') && obj.getClone === 'function') {\n return obj.getClone();\n }\n\n copy = {};\n if (typeof obj.constructor === 'function' &&\n typeof obj.constructor.call === 'function') {\n copy = new obj.constructor();\n }\n\n for (let key in obj) {\n\n if (!obj.hasOwnProperty(key)) {\n continue;\n }\n\n if (Monster.Types.isPrimitive(obj[key])) {\n copy[key] = obj[key];\n continue;\n }\n\n copy[key] = clone(obj[key]);\n }\n\n return copy;\n}\n\nMonster.assignToNamespace('Monster.Util', clone);\nexport {Monster, clone}\n", + "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport {validateObject} from '../types/validate.js';\n\n/**\n * deep freeze a object\n *\n * you can call the method via the monster namespace `Monster.Util.deepFreeze()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/freeze.js';\n * console.log(Monster.Util.deepFreeze({})) \n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/freeze.js';\n * console.log(deepFreeze({})) \n * </script>\n * ```\n *\n * @param {object} obj object to be freeze\n * @since 1.0.0\n * @returns {object}\n * @memberOf Monster/Util\n * @copyright schukai GmbH\n * @throws {TypeError} value is not a object\n */\nfunction deepFreeze(object) {\n \n validateObject(object)\n\n // Retrieve the defined property names of the object\n var propNames = Object.getOwnPropertyNames(object);\n\n // Freeze properties before freezing yourself\n for (let name of propNames) {\n let value = object[name];\n\n object[name] = value && typeof value === \"object\" ?\n deepFreeze(value) : value;\n }\n\n return Object.freeze(object);\n}\n\nMonster.assignToNamespace('Monster.Util', deepFreeze);\nexport {Monster, deepFreeze}\n" ] } \ No newline at end of file diff --git a/packages/monster/dist/monster.js b/packages/monster/dist/monster.js index 1aa777600..f9cb8b333 100644 --- a/packages/monster/dist/monster.js +++ b/packages/monster/dist/monster.js @@ -1,2 +1,2 @@ -/** Monster 1.0.14, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ -(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){(function(global){(function(){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.random=random;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function random(min,max){if(min===undefined){min=0}if(max===undefined){max=MAX}if(max<min){throw new Error("max must be greater than min")}return Math.round(create(min,max))}var MAX=1e9;Math.log2=Math.log2||function(n){return Math.log(n)/Math.log(2)};function create(min,max){var crypt;if(typeof global!=="undefined"){var _global,_global2;crypt=((_global=global)===null||_global===void 0?void 0:_global["crypto"])||((_global2=global)===null||_global2===void 0?void 0:_global2["msCrypto"])}else{crypt=typeof crypto!=="undefined"?crypto:undefined}if(typeof crypt==="undefined"){throw new Error("missing crypt")}var rval=0;var range=max-min;if(range<2){return min}var bitsNeeded=Math.ceil(Math.log2(range));if(bitsNeeded>53){throw new Error("we cannot generate numbers larger than 53 bits.")}var bytesNeeded=Math.ceil(bitsNeeded/8);var mask=Math.pow(2,bitsNeeded)-1;var byteArray=new Uint8Array(bytesNeeded);crypt.getRandomValues(byteArray);var p=(bytesNeeded-1)*8;for(var i=0;i<bytesNeeded;i++){rval+=byteArray[i]*Math.pow(2,p);p-=8}rval=rval&mask;if(rval>=range){return create(min,max)}return min+rval}_namespace.Monster.assignToNamespace("Monster.Math",random)}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../namespace.js":3}],2:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("./namespace.js");require("./types/id.js");require("./types/is.js");require("./types/object.js");require("./types/version.js");require("./types/observer.js");require("./types/observerlist.js");require("./types/validate.js");require("./math/random.js");require("./util/clone.js");require("./util/freeze.js");_namespace.Monster.Util.deepFreeze(_namespace.Monster)},{"./math/random.js":1,"./namespace.js":3,"./types/id.js":4,"./types/is.js":5,"./types/object.js":6,"./types/observer.js":7,"./types/observerlist.js":8,"./types/validate.js":9,"./types/version.js":10,"./util/clone.js":11,"./util/freeze.js":12}],3:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.assignToNamespace=assignToNamespace;exports.Monster=void 0;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}var Namespace=function(){function Namespace(namespace){_classCallCheck(this,Namespace);if(namespace===undefined||typeof namespace!=="string"){throw new Error("namespace is not a string")}this.namespace=namespace}_createClass(Namespace,[{key:"getNamespace",value:function getNamespace(){return this.namespace}},{key:"toString",value:function toString(){return this.getNamespace()}}]);return Namespace}();var Monster=new Namespace("Monster");exports.Monster=Monster;assignToNamespace("Monster",assignToNamespace);function assignToNamespace(ns){var current=namespaceFor(ns.split("."));for(var i=0,l=arguments.length<=1?0:arguments.length-1;i<l;i++){current[objectName(i+1<1||arguments.length<=i+1?undefined:arguments[i+1])]=i+1<1||arguments.length<=i+1?undefined:arguments[i+1]}}function objectName(fn){try{if(typeof fn!=="function"){throw new Error("the first argument is not a function or class.")}if(fn.hasOwnProperty("name")){return fn.name}if("function"===typeof fn.toString){var s=fn.toString();var f=s.match(/^\s*function\s+([^\s(]+)/);if(Array.isArray(f)&&typeof f[1]==="string"){return f[1]}var c=s.match(/^\s*class\s+([^\s(]+)/);if(Array.isArray(c)&&typeof c[1]==="string"){return c[1]}}}catch(e){throw new Error("exception "+e)}throw new Error("the name of the class or function cannot be resolved.")}function namespaceFor(parts){var space=Monster,ns="Monster";for(var i=0;i<parts.length;i++){if("Monster"===parts[i]){continue}ns+="."+parts[i];if(!space.hasOwnProperty(parts[i])){space[parts[i]]=new Namespace(ns)}space=space[parts[i]]}return space}},{}],4:[function(require,module,exports){(function(global){(function(){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ID=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var internalCounter=0;var ID=function(_Monster$Types$Object){_inherits(ID,_Monster$Types$Object);var _super=_createSuper(ID);function ID(){var _this;_classCallCheck(this,ID);_this=_super.call(this);internalCounter+=1;_this.id=global.btoa(_namespace.Monster.Math.random(1,1e4)).replace(/=/g,"").replace(/^[0-9]+/,"X")+internalCounter;return _this}_createClass(ID,[{key:"toString",value:function toString(){return this.id}}]);return ID}(_namespace.Monster.Types.Object);exports.ID=ID;_namespace.Monster.assignToNamespace("Monster.Types",ID)}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../namespace.js":3,"../types/object.js":6}],5:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isPrimitive=isPrimitive;exports.isBoolean=isBoolean;exports.isString=isString;exports.isObject=isObject;exports.isArray=isArray;exports.isFunction=isFunction;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function isPrimitive(value){var type;if(value===undefined||value===null){return true}type=_typeof(value);if(type==="string"||type==="number"||type==="boolean"||type==="symbol"){return true}return false}function isBoolean(value){if(value===true||value===false){return true}return false}function isString(value){if(value===undefined||typeof value!=="string"){return false}return true}function isObject(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(_typeof(value)==="object"){return true}return false}function isArray(value){if(Array.isArray(value)){return true}return false}function isFunction(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(typeof value==="function"){return true}return false}_namespace.Monster.assignToNamespace("Monster.Types",isPrimitive,isBoolean,isString,isObject,isArray,isFunction)},{"../namespace.js":3}],6:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Object=void 0;var _namespace=require("../namespace.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}var _Object=function(){function Object(){_classCallCheck(this,Object)}_createClass(Object,[{key:"toString",value:function toString(){return JSON.stringify(this)}}]);return Object}();exports.Object=_Object;_namespace.Monster.assignToNamespace("Monster.Types",_Object)},{"../namespace.js":3}],7:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Observer=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Observer=function(_Monster$Types$Object){_inherits(Observer,_Monster$Types$Object);var _super=_createSuper(Observer);function Observer(callback){var _this;_classCallCheck(this,Observer);_this=_super.call(this);if(typeof callback!=="function"){throw new Error("observer callback must be a function")}_this.callback=callback;for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}_this.arguments=args;_this.tags=new Set;return _this}_createClass(Observer,[{key:"addTag",value:function addTag(tag){this.tags.add(tag);return this}},{key:"removeTag",value:function removeTag(tag){this.tags["delete"](tag);return this}},{key:"getTags",value:function getTags(){return this.tags}},{key:"hasTag",value:function hasTag(tag){return this.tags.has(tag)}},{key:"update",value:function update(subject){var self=this;return new Promise(function(resolve,reject){if(!(subject instanceof Object)){reject("subject must be an object")}var result=self.callback.apply(subject,self.arguments);resolve(result)})}}]);return Observer}(_namespace.Monster.Types.Object);exports.Observer=Observer;_namespace.Monster.assignToNamespace("Monster.Types",Observer)},{"../namespace.js":3,"../types/object.js":6}],8:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ObserverList=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ObserverList=function(_Monster$Types$Object){_inherits(ObserverList,_Monster$Types$Object);var _super=_createSuper(ObserverList);function ObserverList(){var _this;_classCallCheck(this,ObserverList);_this=_super.call(this);_this.observers=[];return _this}_createClass(ObserverList,[{key:"attach",value:function attach(observer){checkIsObserver(observer);this.observers.push(observer);return this}},{key:"detach",value:function detach(observer){checkIsObserver(observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){this.observers.splice(i,1)}}return this}},{key:"contains",value:function contains(observer){checkIsObserver(observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){return true}}return false}},{key:"notify",value:function notify(subject){var pomises=[];var i=0,l=this.observers.length;for(;i<l;i++){pomises.push(this.observers[i].update(subject))}return Promise.all(pomises)}}]);return ObserverList}(_namespace.Monster.Types.Object);exports.ObserverList=ObserverList;function checkIsObserver(observer){if(!(observer instanceof _namespace.Monster.Types.Observer)){throw new Error("argument must be instance of observer")}return true}_namespace.Monster.assignToNamespace("Monster.Types",ObserverList)},{"../namespace.js":3,"../types/object.js":6}],9:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.validatePrimitive=validatePrimitive;exports.validateBoolean=validateBoolean;exports.validateString=validateString;exports.validateObject=validateObject;exports.validateArray=validateArray;exports.validateFunction=validateFunction;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _is=require("../types/is.js");function validatePrimitive(value){if(!(0,_is.isPrimitive)(value)){throw new TypeError("value is not a primitive")}}function validateBoolean(value){if(!(0,_is.isBoolean)(value)){throw new TypeError("value is not a boolean")}}function validateString(value){if(!(0,_is.isString)(value)){throw new TypeError("value is not a string")}}function validateObject(value){if(!(0,_is.isObject)(value)){throw new TypeError("value is not a object")}}function validateArray(value){if(!(0,_is.isArray)(value)){throw new TypeError("value is not not a array")}}function validateFunction(value){if(!(0,_is.isFunction)(value)){throw new TypeError("value is not a function")}}_namespace.Monster.assignToNamespace("Monster.Types",validatePrimitive,validateBoolean,validateString,validateObject,validateArray,validateFunction)},{"../namespace.js":3,"../types/is.js":5}],10:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.getVersion=getVersion;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Version=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Version=function(_Monster$Types$Object){_inherits(Version,_Monster$Types$Object);var _super=_createSuper(Version);function Version(major,minor,patch){var _this;_classCallCheck(this,Version);_this=_super.call(this);if(typeof major==="string"&&minor===undefined&&patch===undefined){var parts=major.toString().split(".");major=parseInt(parts[0]||0);minor=parseInt(parts[1]||0);patch=parseInt(parts[2]||0)}if(major===undefined){throw new Error("major version is undefined")}if(minor===undefined){minor=0}if(patch===undefined){patch=0}_this.major=parseInt(major);_this.minor=parseInt(minor);_this.patch=parseInt(patch);if(isNaN(_this.major)){throw new Error("major is not a number")}if(isNaN(_this.minor)){throw new Error("minor is not a number")}if(isNaN(_this.patch)){throw new Error("patch is not a number")}return _this}_createClass(Version,[{key:"toString",value:function toString(){return this.major+"."+this.minor+"."+this.patch}},{key:"compareTo",value:function compareTo(version){if(version instanceof Version){version=version.toString()}if(typeof version!=="string"){throw new Error("type exception")}if(version===this.toString()){return 0}var a=[this.major,this.minor,this.patch];var b=version.split(".");var len=Math.max(a.length,b.length);for(var i=0;i<len;i+=1){if(a[i]&&!b[i]&&parseInt(a[i])>0||parseInt(a[i])>parseInt(b[i])){return 1}else if(b[i]&&!a[i]&&parseInt(b[i])>0||parseInt(a[i])<parseInt(b[i])){return-1}}return 0}}]);return Version}(_namespace.Monster.Types.Object);exports.Version=Version;_namespace.Monster.assignToNamespace("Monster.Types",Version);var monsterVersion;function getVersion(){if(monsterVersion instanceof Version){return monsterVersion}monsterVersion=new Version("1.0.14");return monsterVersion}_namespace.Monster.assignToNamespace("Monster",getVersion)},{"../namespace.js":3,"../types/object.js":6}],11:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.clone=clone;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _is=require("../types/is.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function clone(obj){if(null===obj){return obj}if((0,_is.isPrimitive)(obj)){return obj}if((0,_is.isFunction)(obj)){return obj}if((0,_is.isArray)(obj)){var copy=[];for(var i=0,len=obj.length;i<len;i++){copy[i]=clone(obj[i])}return copy}if((0,_is.isObject)(obj)){if(obj instanceof Date){var _copy=new Date;_copy.setTime(obj.getTime());return _copy}if(typeof Element!=="undefined"&&obj instanceof Element)return obj;if(typeof HTMLDocument!=="undefined"&&obj instanceof HTMLDocument)return obj;if(typeof DocumentFragment!=="undefined"&&obj instanceof DocumentFragment)return obj;if(typeof globalContext!=="undefined"&&obj===globalContext)return obj;if(typeof window!=="undefined"&&obj===window)return obj;if(typeof document!=="undefined"&&obj===document)return obj;if(typeof navigator!=="undefined"&&obj===navigator)return obj;if(typeof JSON!=="undefined"&&obj===JSON)return obj;try{if(obj instanceof Proxy){return obj}}catch(e){}return cloneObject(obj)}throw new Error("unable to clone obj! its type isn't supported.")}function cloneObject(obj){var copy;if(_typeof(obj.hasOwnProperty("getClone"))&&obj.getClone==="function"){return obj.getClone()}copy={};if(typeof obj.constructor==="function"&&typeof obj.constructor.call==="function"){copy=new obj.constructor}for(var key in obj){if(!obj.hasOwnProperty(key)){continue}if(_namespace.Monster.Types.isPrimitive(obj[key])){copy[key]=obj[key];continue}copy[key]=clone(obj[key])}return copy}_namespace.Monster.assignToNamespace("Monster.Util",clone)},{"../namespace.js":3,"../types/is.js":5}],12:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.deepFreeze=deepFreeze;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _validate=require("../types/validate.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},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 normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function deepFreeze(object){(0,_validate.validateObject)(object);var propNames=Object.getOwnPropertyNames(object);var _iterator=_createForOfIteratorHelper(propNames),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var name=_step.value;var value=object[name];object[name]=value&&_typeof(value)==="object"?deepFreeze(value):value}}catch(err){_iterator.e(err)}finally{_iterator.f()}return Object.freeze(object)}_namespace.Monster.assignToNamespace("Monster.Util",deepFreeze)},{"../namespace.js":3,"../types/validate.js":9}]},{},[2]); +/** Monster 1.1.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){(function(global){(function(){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.random=random;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function random(min,max){if(min===undefined){min=0}if(max===undefined){max=MAX}if(max<min){throw new Error("max must be greater than min")}return Math.round(create(min,max))}var MAX=1e9;Math.log2=Math.log2||function(n){return Math.log(n)/Math.log(2)};function create(min,max){var crypt;if(typeof global!=="undefined"){var _global,_global2;crypt=((_global=global)===null||_global===void 0?void 0:_global["crypto"])||((_global2=global)===null||_global2===void 0?void 0:_global2["msCrypto"])}else{crypt=typeof crypto!=="undefined"?crypto:undefined}if(typeof crypt==="undefined"){throw new Error("missing crypt")}var rval=0;var range=max-min;if(range<2){return min}var bitsNeeded=Math.ceil(Math.log2(range));if(bitsNeeded>53){throw new Error("we cannot generate numbers larger than 53 bits.")}var bytesNeeded=Math.ceil(bitsNeeded/8);var mask=Math.pow(2,bitsNeeded)-1;var byteArray=new Uint8Array(bytesNeeded);crypt.getRandomValues(byteArray);var p=(bytesNeeded-1)*8;for(var i=0;i<bytesNeeded;i++){rval+=byteArray[i]*Math.pow(2,p);p-=8}rval=rval&mask;if(rval>=range){return create(min,max)}return min+rval}_namespace.Monster.assignToNamespace("Monster.Math",random)}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../namespace.js":3}],2:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("./namespace.js");require("./types/id.js");require("./types/is.js");require("./types/object.js");require("./types/version.js");require("./types/observer.js");require("./types/observerlist.js");require("./types/validate.js");require("./math/random.js");require("./util/clone.js");require("./util/freeze.js");_namespace.Monster.Util.deepFreeze(_namespace.Monster)},{"./math/random.js":1,"./namespace.js":3,"./types/id.js":4,"./types/is.js":5,"./types/object.js":6,"./types/observer.js":7,"./types/observerlist.js":8,"./types/validate.js":9,"./types/version.js":10,"./util/clone.js":11,"./util/freeze.js":12}],3:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.assignToNamespace=assignToNamespace;exports.Monster=void 0;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}var Namespace=function(){function Namespace(namespace){_classCallCheck(this,Namespace);if(namespace===undefined||typeof namespace!=="string"){throw new Error("namespace is not a string")}this.namespace=namespace}_createClass(Namespace,[{key:"getNamespace",value:function getNamespace(){return this.namespace}},{key:"toString",value:function toString(){return this.getNamespace()}}]);return Namespace}();var Monster=new Namespace("Monster");exports.Monster=Monster;assignToNamespace("Monster",assignToNamespace);function assignToNamespace(ns){var current=namespaceFor(ns.split("."));for(var i=0,l=arguments.length<=1?0:arguments.length-1;i<l;i++){current[objectName(i+1<1||arguments.length<=i+1?undefined:arguments[i+1])]=i+1<1||arguments.length<=i+1?undefined:arguments[i+1]}}function objectName(fn){try{if(typeof fn!=="function"){throw new Error("the first argument is not a function or class.")}if(fn.hasOwnProperty("name")){return fn.name}if("function"===typeof fn.toString){var s=fn.toString();var f=s.match(/^\s*function\s+([^\s(]+)/);if(Array.isArray(f)&&typeof f[1]==="string"){return f[1]}var c=s.match(/^\s*class\s+([^\s(]+)/);if(Array.isArray(c)&&typeof c[1]==="string"){return c[1]}}}catch(e){throw new Error("exception "+e)}throw new Error("the name of the class or function cannot be resolved.")}function namespaceFor(parts){var space=Monster,ns="Monster";for(var i=0;i<parts.length;i++){if("Monster"===parts[i]){continue}ns+="."+parts[i];if(!space.hasOwnProperty(parts[i])){space[parts[i]]=new Namespace(ns)}space=space[parts[i]]}return space}},{}],4:[function(require,module,exports){(function(global){(function(){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ID=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var internalCounter=0;var ID=function(_Monster$Types$Object){_inherits(ID,_Monster$Types$Object);var _super=_createSuper(ID);function ID(){var _this;_classCallCheck(this,ID);_this=_super.call(this);internalCounter+=1;_this.id=global.btoa(_namespace.Monster.Math.random(1,1e4)).replace(/=/g,"").replace(/^[0-9]+/,"X")+internalCounter;return _this}_createClass(ID,[{key:"toString",value:function toString(){return this.id}}]);return ID}(_namespace.Monster.Types.Object);exports.ID=ID;_namespace.Monster.assignToNamespace("Monster.Types",ID)}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../namespace.js":3,"../types/object.js":6}],5:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isPrimitive=isPrimitive;exports.isBoolean=isBoolean;exports.isString=isString;exports.isObject=isObject;exports.isArray=isArray;exports.isFunction=isFunction;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function isPrimitive(value){var type;if(value===undefined||value===null){return true}type=_typeof(value);if(type==="string"||type==="number"||type==="boolean"||type==="symbol"){return true}return false}function isBoolean(value){if(value===true||value===false){return true}return false}function isString(value){if(value===undefined||typeof value!=="string"){return false}return true}function isObject(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(_typeof(value)==="object"){return true}return false}function isArray(value){if(Array.isArray(value)){return true}return false}function isFunction(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(typeof value==="function"){return true}return false}_namespace.Monster.assignToNamespace("Monster.Types",isPrimitive,isBoolean,isString,isObject,isArray,isFunction)},{"../namespace.js":3}],6:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Object=void 0;var _namespace=require("../namespace.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}var _Object=function(){function Object(){_classCallCheck(this,Object)}_createClass(Object,[{key:"toString",value:function toString(){return JSON.stringify(this)}}]);return Object}();exports.Object=_Object;_namespace.Monster.assignToNamespace("Monster.Types",_Object)},{"../namespace.js":3}],7:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Observer=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Observer=function(_Monster$Types$Object){_inherits(Observer,_Monster$Types$Object);var _super=_createSuper(Observer);function Observer(callback){var _this;_classCallCheck(this,Observer);_this=_super.call(this);if(typeof callback!=="function"){throw new Error("observer callback must be a function")}_this.callback=callback;for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}_this.arguments=args;_this.tags=new Set;return _this}_createClass(Observer,[{key:"addTag",value:function addTag(tag){this.tags.add(tag);return this}},{key:"removeTag",value:function removeTag(tag){this.tags["delete"](tag);return this}},{key:"getTags",value:function getTags(){return this.tags}},{key:"hasTag",value:function hasTag(tag){return this.tags.has(tag)}},{key:"update",value:function update(subject){var self=this;return new Promise(function(resolve,reject){if(!(subject instanceof Object)){reject("subject must be an object")}var result=self.callback.apply(subject,self.arguments);resolve(result)})}}]);return Observer}(_namespace.Monster.Types.Object);exports.Observer=Observer;_namespace.Monster.assignToNamespace("Monster.Types",Observer)},{"../namespace.js":3,"../types/object.js":6}],8:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ObserverList=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ObserverList=function(_Monster$Types$Object){_inherits(ObserverList,_Monster$Types$Object);var _super=_createSuper(ObserverList);function ObserverList(){var _this;_classCallCheck(this,ObserverList);_this=_super.call(this);_this.observers=[];return _this}_createClass(ObserverList,[{key:"attach",value:function attach(observer){checkIsObserver(observer);this.observers.push(observer);return this}},{key:"detach",value:function detach(observer){checkIsObserver(observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){this.observers.splice(i,1)}}return this}},{key:"contains",value:function contains(observer){checkIsObserver(observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){return true}}return false}},{key:"notify",value:function notify(subject){var pomises=[];var i=0,l=this.observers.length;for(;i<l;i++){pomises.push(this.observers[i].update(subject))}return Promise.all(pomises)}}]);return ObserverList}(_namespace.Monster.Types.Object);exports.ObserverList=ObserverList;function checkIsObserver(observer){if(!(observer instanceof _namespace.Monster.Types.Observer)){throw new Error("argument must be instance of observer")}return true}_namespace.Monster.assignToNamespace("Monster.Types",ObserverList)},{"../namespace.js":3,"../types/object.js":6}],9:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.validatePrimitive=validatePrimitive;exports.validateBoolean=validateBoolean;exports.validateString=validateString;exports.validateObject=validateObject;exports.validateArray=validateArray;exports.validateFunction=validateFunction;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _is=require("../types/is.js");function validatePrimitive(value){if(!(0,_is.isPrimitive)(value)){throw new TypeError("value is not a primitive")}}function validateBoolean(value){if(!(0,_is.isBoolean)(value)){throw new TypeError("value is not a boolean")}}function validateString(value){if(!(0,_is.isString)(value)){throw new TypeError("value is not a string")}}function validateObject(value){if(!(0,_is.isObject)(value)){throw new TypeError("value is not a object")}}function validateArray(value){if(!(0,_is.isArray)(value)){throw new TypeError("value is not not a array")}}function validateFunction(value){if(!(0,_is.isFunction)(value)){throw new TypeError("value is not a function")}}_namespace.Monster.assignToNamespace("Monster.Types",validatePrimitive,validateBoolean,validateString,validateObject,validateArray,validateFunction)},{"../namespace.js":3,"../types/is.js":5}],10:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.getVersion=getVersion;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Version=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Version=function(_Monster$Types$Object){_inherits(Version,_Monster$Types$Object);var _super=_createSuper(Version);function Version(major,minor,patch){var _this;_classCallCheck(this,Version);_this=_super.call(this);if(typeof major==="string"&&minor===undefined&&patch===undefined){var parts=major.toString().split(".");major=parseInt(parts[0]||0);minor=parseInt(parts[1]||0);patch=parseInt(parts[2]||0)}if(major===undefined){throw new Error("major version is undefined")}if(minor===undefined){minor=0}if(patch===undefined){patch=0}_this.major=parseInt(major);_this.minor=parseInt(minor);_this.patch=parseInt(patch);if(isNaN(_this.major)){throw new Error("major is not a number")}if(isNaN(_this.minor)){throw new Error("minor is not a number")}if(isNaN(_this.patch)){throw new Error("patch is not a number")}return _this}_createClass(Version,[{key:"toString",value:function toString(){return this.major+"."+this.minor+"."+this.patch}},{key:"compareTo",value:function compareTo(version){if(version instanceof Version){version=version.toString()}if(typeof version!=="string"){throw new Error("type exception")}if(version===this.toString()){return 0}var a=[this.major,this.minor,this.patch];var b=version.split(".");var len=Math.max(a.length,b.length);for(var i=0;i<len;i+=1){if(a[i]&&!b[i]&&parseInt(a[i])>0||parseInt(a[i])>parseInt(b[i])){return 1}else if(b[i]&&!a[i]&&parseInt(b[i])>0||parseInt(a[i])<parseInt(b[i])){return-1}}return 0}}]);return Version}(_namespace.Monster.Types.Object);exports.Version=Version;_namespace.Monster.assignToNamespace("Monster.Types",Version);var monsterVersion;function getVersion(){if(monsterVersion instanceof Version){return monsterVersion}monsterVersion=new Version("1.1.0");return monsterVersion}_namespace.Monster.assignToNamespace("Monster",getVersion)},{"../namespace.js":3,"../types/object.js":6}],11:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.clone=clone;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _is=require("../types/is.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function clone(obj){if(null===obj){return obj}if((0,_is.isPrimitive)(obj)){return obj}if((0,_is.isFunction)(obj)){return obj}if((0,_is.isArray)(obj)){var copy=[];for(var i=0,len=obj.length;i<len;i++){copy[i]=clone(obj[i])}return copy}if((0,_is.isObject)(obj)){if(obj instanceof Date){var _copy=new Date;_copy.setTime(obj.getTime());return _copy}if(typeof Element!=="undefined"&&obj instanceof Element)return obj;if(typeof HTMLDocument!=="undefined"&&obj instanceof HTMLDocument)return obj;if(typeof DocumentFragment!=="undefined"&&obj instanceof DocumentFragment)return obj;if(typeof globalContext!=="undefined"&&obj===globalContext)return obj;if(typeof window!=="undefined"&&obj===window)return obj;if(typeof document!=="undefined"&&obj===document)return obj;if(typeof navigator!=="undefined"&&obj===navigator)return obj;if(typeof JSON!=="undefined"&&obj===JSON)return obj;try{if(obj instanceof Proxy){return obj}}catch(e){}return cloneObject(obj)}throw new Error("unable to clone obj! its type isn't supported.")}function cloneObject(obj){var copy;if(_typeof(obj.hasOwnProperty("getClone"))&&obj.getClone==="function"){return obj.getClone()}copy={};if(typeof obj.constructor==="function"&&typeof obj.constructor.call==="function"){copy=new obj.constructor}for(var key in obj){if(!obj.hasOwnProperty(key)){continue}if(_namespace.Monster.Types.isPrimitive(obj[key])){copy[key]=obj[key];continue}copy[key]=clone(obj[key])}return copy}_namespace.Monster.assignToNamespace("Monster.Util",clone)},{"../namespace.js":3,"../types/is.js":5}],12:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.deepFreeze=deepFreeze;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _validate=require("../types/validate.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},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 normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function deepFreeze(object){(0,_validate.validateObject)(object);var propNames=Object.getOwnPropertyNames(object);var _iterator=_createForOfIteratorHelper(propNames),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var name=_step.value;var value=object[name];object[name]=value&&_typeof(value)==="object"?deepFreeze(value):value}}catch(err){_iterator.e(err)}finally{_iterator.f()}return Object.freeze(object)}_namespace.Monster.assignToNamespace("Monster.Util",deepFreeze)},{"../namespace.js":3,"../types/validate.js":9}]},{},[2]); diff --git a/packages/monster/package.json b/packages/monster/package.json index bdddce758..2a6581e25 100644 --- a/packages/monster/package.json +++ b/packages/monster/package.json @@ -1,6 +1,6 @@ { "name": "@schukai/monster", - "version": "1.0.14", + "version": "1.1.0", "description": "Monster is a simple library for creating fast, robust and lightweight websites.", "keywords": [ "framework", diff --git a/packages/monster/source/math/random.js b/packages/monster/source/math/random.js index 7c7563fdb..281eb871d 100644 --- a/packages/monster/source/math/random.js +++ b/packages/monster/source/math/random.js @@ -14,7 +14,7 @@ import {Monster} from '../namespace.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/math/random.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/math/random.js'; * console.log(Monster.Math.random(1,10)) // ↦ 5 * </script> * ``` @@ -23,7 +23,7 @@ import {Monster} from '../namespace.js'; * * ``` * <script type="module"> - * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/math/random.js'; + * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/math/random.js'; * console.log(random(1,10)) // ↦ 5 * </script> * ``` diff --git a/packages/monster/source/namespace.js b/packages/monster/source/namespace.js index 70909b782..9f96894a8 100644 --- a/packages/monster/source/namespace.js +++ b/packages/monster/source/namespace.js @@ -71,7 +71,7 @@ assignToNamespace('Monster', assignToNamespace); * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/namespace.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/namespace.js'; * function hello() { * console.log('Hello World!'); * } diff --git a/packages/monster/source/types/id.js b/packages/monster/source/types/id.js index 749bdb1e4..699a24dee 100644 --- a/packages/monster/source/types/id.js +++ b/packages/monster/source/types/id.js @@ -15,7 +15,7 @@ let internalCounter = 0; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/id.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/id.js'; * console.log(new Monster.Types.ID()) * console.log(new Monster.Types.ID()) * </script> @@ -25,7 +25,7 @@ let internalCounter = 0; * * ``` * <script type="module"> - * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/id.js'; + * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/id.js'; * console.log(new ID()) * console.log(new ID()) * </script> diff --git a/packages/monster/source/types/is.js b/packages/monster/source/types/is.js index 984b04d3d..d05d26d56 100644 --- a/packages/monster/source/types/is.js +++ b/packages/monster/source/types/is.js @@ -13,7 +13,7 @@ import {Monster} from '../namespace.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isPrimitive('2')) // ↦ false * console.log(Monster.Types.isPrimitive([])) // ↦ true * </script> @@ -23,7 +23,7 @@ import {Monster} from '../namespace.js'; * * ``` * <script type="module"> - * import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isPrimitive('2')) // ↦ true * console.log(isPrimitive([])) // ↦ false * </script> @@ -58,7 +58,7 @@ function isPrimitive(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isBoolean('2')) // ↦ false * console.log(Monster.Types.isBoolean([])) // ↦ false * console.log(Monster.Types.isBoolean(true)) // ↦ true @@ -69,7 +69,7 @@ function isPrimitive(value) { * * ``` * <script type="module"> - * import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isBoolean('2')) // ↦ false * console.log(isBoolean([])) // ↦ false * console.log(isBoolean(2>4)) // ↦ true @@ -98,7 +98,7 @@ function isBoolean(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isString('2')) // ↦ true * console.log(Monster.Types.isString([])) // ↦ false * </script> @@ -108,7 +108,7 @@ function isBoolean(value) { * * ``` * <script type="module"> - * import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isString('2')) // ↦ true * console.log(isString([])) // ↦ false * </script> @@ -134,7 +134,7 @@ function isString(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isObject('2')) // ↦ false * console.log(Monster.Types.isObject([])) // ↦ false * console.log(Monster.Types.isObject({})) // ↦ true @@ -145,7 +145,7 @@ function isString(value) { * * ``` * <script type="module"> - * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isObject('2')) // ↦ false * console.log(isObject([])) // ↦ false * </script> @@ -176,7 +176,7 @@ function isObject(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isArray('2')) // ↦ false * console.log(Monster.Types.isArray([])) // ↦ true * </script> @@ -186,7 +186,7 @@ function isObject(value) { * * ``` * <script type="module"> - * import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isArray('2')) // ↦ false * console.log(isArray([])) // ↦ true * </script> @@ -212,7 +212,7 @@ function isArray(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(Monster.Types.isFunction(()=>{})) // ↦ true * console.log(Monster.Types.isFunction('2')) // ↦ false * console.log(Monster.Types.isFunction([])) // ↦ false @@ -223,7 +223,7 @@ function isArray(value) { * * ``` * <script type="module"> - * import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/is.js'; + * import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/is.js'; * console.log(isFunction(()=>{})) // ↦ true * console.log(isFunction('2')) // ↦ false * console.log(isFunction([])) // ↦ false diff --git a/packages/monster/source/types/object.js b/packages/monster/source/types/object.js index 45c57d0d2..b00d39b27 100644 --- a/packages/monster/source/types/object.js +++ b/packages/monster/source/types/object.js @@ -14,7 +14,7 @@ import {Monster} from '../namespace.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/object.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/object.js'; * console.log(new Monster.Types.Object()) * console.log(new Monster.Types.Object()) * </script> @@ -24,7 +24,7 @@ import {Monster} from '../namespace.js'; * * ``` * <script type="module"> - * import {Object} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/object.js'; + * import {Object} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/object.js'; * console.log(new Object()) * console.log(new Object()) * </script> diff --git a/packages/monster/source/types/observer.js b/packages/monster/source/types/observer.js index 4e9841b5b..fc1e81f66 100644 --- a/packages/monster/source/types/observer.js +++ b/packages/monster/source/types/observer.js @@ -14,7 +14,7 @@ import '../types/object.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observer.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observer.js'; * console.log(new Monster.Types.Observer()) * console.log(new Monster.Types.Observer()) * </script> @@ -24,7 +24,7 @@ import '../types/object.js'; * * ``` * <script type="module"> - * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observer.js'; + * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observer.js'; * console.log(Observer()) * console.log(Observer()) * </script> diff --git a/packages/monster/source/types/observerlist.js b/packages/monster/source/types/observerlist.js index 04baff5fe..186997bf8 100644 --- a/packages/monster/source/types/observerlist.js +++ b/packages/monster/source/types/observerlist.js @@ -14,7 +14,7 @@ import '../types/object.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observerlist.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observerlist.js'; * console.log(new Monster.Types.ObserverList()) * console.log(new Monster.Types.ObserverList()) * </script> @@ -24,7 +24,7 @@ import '../types/object.js'; * * ``` * <script type="module"> - * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/observerlist.js'; + * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/observerlist.js'; * console.log(ObserverList()) * console.log(ObserverList()) * </script> diff --git a/packages/monster/source/types/validate.js b/packages/monster/source/types/validate.js index b2fc55dc6..5b9a01b66 100644 --- a/packages/monster/source/types/validate.js +++ b/packages/monster/source/types/validate.js @@ -14,7 +14,7 @@ import {isPrimitive, isBoolean, isString, isObject, isArray, isFunction} from '. * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validatePrimitive('2')) // ↦ undefined * console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError * </script> @@ -24,7 +24,7 @@ import {isPrimitive, isBoolean, isString, isObject, isArray, isFunction} from '. * * ``` * <script type="module"> - * import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validatePrimitive('2')) // ↦ undefined * console.log(validatePrimitive([])) // ↦ TypeError * </script> @@ -53,7 +53,7 @@ function validatePrimitive(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateBoolean(true)) // ↦ undefined * console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError * console.log(Monster.Types.validateBoolean([])) // ↦ TypeError @@ -64,7 +64,7 @@ function validatePrimitive(value) { * * ``` * <script type="module"> - * import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateBoolean(false)) // ↦ undefined * console.log(validateBoolean('2')) // ↦ TypeError * console.log(validateBoolean([])) // ↦ TypeError @@ -92,7 +92,7 @@ function validateBoolean(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateString('2')) // ↦ undefined * console.log(Monster.Types.validateString([])) // ↦ TypeError * </script> @@ -102,7 +102,7 @@ function validateBoolean(value) { * * ``` * <script type="module"> - * import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateString('2')) // ↦ undefined * console.log(validateString([])) // ↦ TypeError * </script> @@ -130,7 +130,7 @@ function validateString(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateObject({})) // ↦ undefined * console.log(Monster.Types.validateObject('2')) // ↦ TypeError * console.log(Monster.Types.validateObject([])) // ↦ TypeError @@ -141,7 +141,7 @@ function validateString(value) { * * ``` * <script type="module"> - * import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateObject({})) // ↦ undefined * console.log(validateObject('2')) // ↦ TypeError * console.log(validateObject([])) // ↦ TypeError @@ -168,7 +168,7 @@ function validateObject(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateArray('2')) // ↦ TypeError * console.log(Monster.Types.validateArray([])) // ↦ undefined * </script> @@ -178,7 +178,7 @@ function validateObject(value) { * * ``` * <script type="module"> - * import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateArray('2')) // ↦ TypeError * console.log(validateArray([])) // ↦ undefined * </script> @@ -204,7 +204,7 @@ function validateArray(value) { * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(Monster.Types.validateFunction(()=>{})) // ↦ undefined * console.log(Monster.Types.validateFunction('2')) // ↦ TypeError * console.log(Monster.Types.validateFunction([])) // ↦ TypeError @@ -215,7 +215,7 @@ function validateArray(value) { * * ``` * <script type="module"> - * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/validate.js'; + * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/validate.js'; * console.log(validateFunction(()=>{})) // ↦ undefined * console.log(validateFunction('2')) // ↦ TypeError * console.log(validateFunction([])) // ↦ TypeError diff --git a/packages/monster/source/types/version.js b/packages/monster/source/types/version.js index b129c8237..479019c11 100644 --- a/packages/monster/source/types/version.js +++ b/packages/monster/source/types/version.js @@ -10,7 +10,7 @@ import '../types/object.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; * console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3 * console.log(new Monster.Types.Version('1')) // ↦ 1.0.0 * </script> @@ -20,7 +20,7 @@ import '../types/object.js'; * * ``` * <script type="module"> - * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; + * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; * console.log(new Version('1.2.3')) // ↦ 1.2.3 * console.log(new Version('1')) // ↦ 1.0.0 * </script> @@ -150,7 +150,7 @@ let monsterVersion; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; * console.log(Monster.getVersion()) * console.log(Monster.getVersion()) * </script> @@ -160,7 +160,7 @@ let monsterVersion; * * ``` * <script type="module"> - * import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/types/version.js'; + * import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/types/version.js'; * console.log(getVersion()) * console.log(getVersion()) * </script> @@ -177,7 +177,7 @@ function getVersion() { return monsterVersion; } /**#@+ dont touch, replaced by make with package.json version */ - monsterVersion = new Version('1.0.14') + monsterVersion = new Version('1.1.0') /**#@-*/ return monsterVersion; diff --git a/packages/monster/source/util/clone.js b/packages/monster/source/util/clone.js index b9f2f455d..c37d763c5 100644 --- a/packages/monster/source/util/clone.js +++ b/packages/monster/source/util/clone.js @@ -21,7 +21,7 @@ import {isObject, isFunction, isPrimitive, isArray} from '../types/is.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/clone.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/clone.js'; * console.log(Monster.Util.clone({})) * </script> * ``` @@ -30,7 +30,7 @@ import {isObject, isFunction, isPrimitive, isArray} from '../types/is.js'; * * ``` * <script type="module"> - * import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/clone.js'; + * import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/clone.js'; * console.log(clone({})) * </script> * ``` diff --git a/packages/monster/source/util/freeze.js b/packages/monster/source/util/freeze.js index 7e3e70105..45e856ba9 100644 --- a/packages/monster/source/util/freeze.js +++ b/packages/monster/source/util/freeze.js @@ -14,7 +14,7 @@ import {validateObject} from '../types/validate.js'; * * ``` * <script type="module"> - * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/freeze.js'; + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/freeze.js'; * console.log(Monster.Util.deepFreeze({})) * </script> * ``` @@ -23,7 +23,7 @@ import {validateObject} from '../types/validate.js'; * * ``` * <script type="module"> - * import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.0.14/dist/modules/util/freeze.js'; + * import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.1.0/dist/modules/util/freeze.js'; * console.log(deepFreeze({})) * </script> * ``` diff --git a/packages/monster/test/cases/monster.js b/packages/monster/test/cases/monster.js index f0f15b425..535e5f907 100644 --- a/packages/monster/test/cases/monster.js +++ b/packages/monster/test/cases/monster.js @@ -8,7 +8,7 @@ describe('Monster', function () { let Version = Monster.Types.Version /**#@+ dont touch, replaced by make with package.json version */ - monsterVersion = new Version('1.0.14') + monsterVersion = new Version('1.1.0') /**#@-*/ let m = Monster.getVersion(); -- GitLab