@schukai/monster 1.28.1 → 1.29.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG +21 -1
- package/README.md +3 -3
- package/dist/modules/constants.js +1 -1
- package/dist/modules/constraints/abstract.js +1 -1
- package/dist/modules/constraints/abstractoperator.js +1 -1
- package/dist/modules/constraints/andoperator.js +1 -1
- package/dist/modules/constraints/invalid.js +1 -1
- package/dist/modules/constraints/isarray.js +1 -1
- package/dist/modules/constraints/isobject.js +1 -1
- package/dist/modules/constraints/namespace.js +1 -1
- package/dist/modules/constraints/oroperator.js +1 -1
- package/dist/modules/constraints/valid.js +1 -1
- package/dist/modules/data/buildmap.js +2 -2
- package/dist/modules/data/buildtree.js +1 -1
- package/dist/modules/data/datasource/namespace.js +1 -1
- package/dist/modules/data/datasource/restapi/writeerror.js +1 -1
- package/dist/modules/data/datasource/restapi.js +1 -1
- package/dist/modules/data/datasource/storage/localstorage.js +1 -1
- package/dist/modules/data/datasource/storage/namespace.js +1 -1
- package/dist/modules/data/datasource/storage/sessionstorage.js +1 -1
- package/dist/modules/data/datasource/storage.js +1 -1
- package/dist/modules/data/datasource.js +1 -1
- package/dist/modules/data/diff.js +1 -1
- package/dist/modules/data/extend.js +1 -1
- package/dist/modules/data/namespace.js +1 -1
- package/dist/modules/data/pathfinder.js +1 -1
- package/dist/modules/data/pipe.js +1 -1
- package/dist/modules/data/transformer.js +1 -1
- package/dist/modules/dom/assembler.js +1 -1
- package/dist/modules/dom/attributes.js +1 -1
- package/dist/modules/dom/constants.js +1 -1
- package/dist/modules/dom/customcontrol.js +1 -1
- package/dist/modules/dom/customelement.js +2 -2
- package/dist/modules/dom/events.js +1 -1
- package/dist/modules/dom/focusmanager.js +1 -1
- package/dist/modules/dom/locale.js +1 -1
- package/dist/modules/dom/namespace.js +1 -1
- package/dist/modules/dom/resource/data.js +1 -1
- package/dist/modules/dom/resource/link/stylesheet.js +1 -1
- package/dist/modules/dom/resource/link.js +1 -1
- package/dist/modules/dom/resource/script.js +1 -1
- package/dist/modules/dom/resource.js +1 -1
- package/dist/modules/dom/resourcemanager.js +1 -1
- package/dist/modules/dom/template.js +1 -1
- package/dist/modules/dom/theme.js +1 -1
- package/dist/modules/dom/updater.js +2 -2
- package/dist/modules/dom/util.js +1 -1
- package/dist/modules/dom/worker/factory.js +1 -1
- package/dist/modules/i18n/formatter.js +1 -1
- package/dist/modules/i18n/locale.js +1 -1
- package/dist/modules/i18n/namespace.js +1 -1
- package/dist/modules/i18n/provider.js +1 -1
- package/dist/modules/i18n/providers/fetch.js +1 -1
- package/dist/modules/i18n/providers/namespace.js +1 -1
- package/dist/modules/i18n/translations.js +1 -1
- package/dist/modules/logging/handler/console.js +1 -1
- package/dist/modules/logging/handler/namespace.js +1 -1
- package/dist/modules/logging/handler.js +1 -1
- package/dist/modules/logging/logentry.js +1 -1
- package/dist/modules/logging/logger.js +1 -1
- package/dist/modules/logging/namespace.js +1 -1
- package/dist/modules/math/namespace.js +1 -1
- package/dist/modules/math/random.js +1 -1
- package/dist/modules/monster.js +1 -1
- package/dist/modules/namespace.js +1 -1
- package/dist/modules/text/formatter.js +1 -1
- package/dist/modules/text/namespace.js +1 -1
- package/dist/modules/types/base.js +1 -1
- package/dist/modules/types/basewithoptions.js +1 -1
- package/dist/modules/types/binary.js +1 -1
- package/dist/modules/types/dataurl.js +1 -1
- package/dist/modules/types/global.js +1 -1
- package/dist/modules/types/id.js +1 -1
- package/dist/modules/types/is.js +1 -1
- package/dist/modules/types/mediatype.js +1 -1
- package/dist/modules/types/namespace.js +1 -1
- package/dist/modules/types/node.js +1 -1
- package/dist/modules/types/nodelist.js +1 -1
- package/dist/modules/types/noderecursiveiterator.js +1 -1
- package/dist/modules/types/observer.js +1 -1
- package/dist/modules/types/observerlist.js +1 -1
- package/dist/modules/types/proxyobserver.js +1 -1
- package/dist/modules/types/queue.js +1 -1
- package/dist/modules/types/randomid.js +1 -1
- package/dist/modules/types/regex.js +1 -1
- package/dist/modules/types/stack.js +1 -1
- package/dist/modules/types/tokenlist.js +1 -1
- package/dist/modules/types/typeof.js +1 -1
- package/dist/modules/types/uniquequeue.js +1 -1
- package/dist/modules/types/uuid.js +1 -1
- package/dist/modules/types/validate.js +1 -1
- package/dist/modules/types/version.js +2 -2
- package/dist/modules/util/clone.js +1 -1
- package/dist/modules/util/comparator.js +1 -1
- package/dist/modules/util/deadmansswitch.js +2 -0
- package/dist/modules/util/freeze.js +1 -1
- package/dist/modules/util/namespace.js +1 -1
- package/dist/modules/util/processing.js +1 -1
- package/dist/modules/util/trimspaces.js +1 -1
- package/dist/monster.dev.js +465 -318
- package/dist/monster.dev.js.map +1 -1
- package/dist/monster.js +2 -2
- package/package.json +1 -1
- package/source/constraints/andoperator.js +5 -5
- package/source/constraints/invalid.js +3 -3
- package/source/constraints/isarray.js +3 -3
- package/source/constraints/isobject.js +3 -3
- package/source/constraints/oroperator.js +5 -5
- package/source/constraints/valid.js +3 -3
- package/source/data/buildmap.js +14 -6
- package/source/data/buildtree.js +2 -2
- package/source/data/datasource/restapi.js +3 -3
- package/source/data/datasource/storage/localstorage.js +2 -2
- package/source/data/datasource/storage/sessionstorage.js +2 -2
- package/source/data/datasource/storage.js +3 -3
- package/source/data/datasource.js +3 -3
- package/source/data/diff.js +3 -3
- package/source/data/extend.js +2 -2
- package/source/data/pathfinder.js +5 -4
- package/source/data/pipe.js +3 -3
- package/source/data/transformer.js +3 -3
- package/source/dom/assembler.js +2 -2
- package/source/dom/attributes.js +27 -27
- package/source/dom/customcontrol.js +1 -1
- package/source/dom/customelement.js +70 -22
- package/source/dom/events.js +7 -7
- package/source/dom/focusmanager.js +2 -2
- package/source/dom/locale.js +2 -2
- package/source/dom/resource/data.js +2 -2
- package/source/dom/resource/link/stylesheet.js +2 -2
- package/source/dom/resource/link.js +2 -2
- package/source/dom/resource/script.js +2 -2
- package/source/dom/resource.js +2 -2
- package/source/dom/resourcemanager.js +2 -2
- package/source/dom/template.js +5 -5
- package/source/dom/theme.js +3 -3
- package/source/dom/updater.js +45 -14
- package/source/dom/util.js +6 -6
- package/source/dom/worker/factory.js +2 -2
- package/source/i18n/formatter.js +4 -4
- package/source/i18n/locale.js +4 -4
- package/source/i18n/provider.js +2 -2
- package/source/i18n/providers/fetch.js +3 -3
- package/source/i18n/translations.js +4 -4
- package/source/logging/handler/console.js +2 -2
- package/source/logging/handler.js +2 -2
- package/source/logging/logentry.js +2 -2
- package/source/logging/logger.js +2 -2
- package/source/math/random.js +2 -2
- package/source/namespace.js +1 -1
- package/source/text/formatter.js +3 -3
- package/source/types/base.js +2 -2
- package/source/types/basewithoptions.js +32 -6
- package/source/types/binary.js +4 -4
- package/source/types/dataurl.js +4 -4
- package/source/types/global.js +4 -4
- package/source/types/id.js +2 -2
- package/source/types/is.js +20 -20
- package/source/types/mediatype.js +4 -4
- package/source/types/node.js +2 -2
- package/source/types/nodelist.js +2 -2
- package/source/types/noderecursiveiterator.js +4 -4
- package/source/types/observer.js +5 -13
- package/source/types/observerlist.js +2 -2
- package/source/types/proxyobserver.js +5 -5
- package/source/types/queue.js +3 -3
- package/source/types/randomid.js +2 -2
- package/source/types/regex.js +2 -2
- package/source/types/stack.js +2 -2
- package/source/types/tokenlist.js +2 -2
- package/source/types/typeof.js +3 -3
- package/source/types/uniquequeue.js +2 -2
- package/source/types/uuid.js +2 -2
- package/source/types/validate.js +20 -20
- package/source/types/version.js +6 -6
- package/source/util/clone.js +2 -2
- package/source/util/comparator.js +3 -3
- package/source/util/deadmansswitch.js +124 -0
- package/source/util/freeze.js +2 -2
- package/source/util/processing.js +3 -3
- package/source/util/trimspaces.js +2 -2
- package/test/cases/dom/customelement.js +213 -3
- package/test/cases/dom/resource/link.js +3 -5
- package/test/cases/dom/updater.js +76 -3
- package/test/cases/math/random.js +3 -0
- package/test/cases/monster.js +1 -1
- package/test/cases/util/deadmansswitch.js +71 -0
- package/test/web/import.js +1 -0
- package/test/web/monster-dev.html +3 -3
- package/test/web/monster.html +2 -2
- package/test/web/test.html +3 -2
- package/test/web/tests.js +2 -2
package/dist/monster.dev.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/** Monster 1.
|
1
|
+
/** Monster 1.29.3, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
|
2
2
|
(function webpackUniversalModuleDefinition(root, factory) {
|
3
3
|
if(typeof exports === 'object' && typeof module === 'object')
|
4
4
|
module.exports = factory();
|
@@ -140,7 +140,7 @@ var Monster = new Namespace("Monster");
|
|
140
140
|
*
|
141
141
|
* ```
|
142
142
|
* <script type="module">
|
143
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
143
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
144
144
|
* function hello() {
|
145
145
|
* console.log('Hello World!');
|
146
146
|
* }
|
@@ -387,7 +387,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
387
387
|
*
|
388
388
|
* ```
|
389
389
|
* <script type="module">
|
390
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
390
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
391
391
|
* new Monster.Types.Base()
|
392
392
|
* </script>
|
393
393
|
* ```
|
@@ -396,7 +396,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
396
396
|
*
|
397
397
|
* ```
|
398
398
|
* <script type="module">
|
399
|
-
* import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
399
|
+
* import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/base.js';
|
400
400
|
* new Base()
|
401
401
|
* </script>
|
402
402
|
* ```
|
@@ -568,7 +568,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
568
568
|
*
|
569
569
|
* ```
|
570
570
|
* <script type="module">
|
571
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
571
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
572
572
|
* new Monster.Constraint.AndOperator();
|
573
573
|
* </script>
|
574
574
|
* ```
|
@@ -577,16 +577,16 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
577
577
|
*
|
578
578
|
* ```
|
579
579
|
* <script type="module">
|
580
|
-
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
580
|
+
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/andoperator.js';
|
581
581
|
* new AndOperator();
|
582
582
|
* </script>
|
583
583
|
* ```
|
584
584
|
*
|
585
585
|
* @example
|
586
586
|
*
|
587
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
588
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
589
|
-
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
587
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/valid.js';
|
588
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/invalid.js';
|
589
|
+
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/andoperator.js';
|
590
590
|
*
|
591
591
|
* new AndOperator(
|
592
592
|
* new Valid(), new Valid()).isValid()
|
@@ -688,7 +688,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
688
688
|
*
|
689
689
|
* ```
|
690
690
|
* <script type="module">
|
691
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
691
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
692
692
|
* new Monster.Constraint.Invalid();
|
693
693
|
* </script>
|
694
694
|
* ```
|
@@ -697,14 +697,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
697
697
|
*
|
698
698
|
* ```
|
699
699
|
* <script type="module">
|
700
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
700
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/invalid.js';
|
701
701
|
* new Invalid();
|
702
702
|
* </script>
|
703
703
|
* ```
|
704
704
|
*
|
705
705
|
* @example
|
706
706
|
*
|
707
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
707
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/invalid.js';
|
708
708
|
*
|
709
709
|
* new Invalid().isValid()
|
710
710
|
* .then(()=>console.log(true))
|
@@ -799,7 +799,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
799
799
|
*
|
800
800
|
* ```
|
801
801
|
* <script type="module">
|
802
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
802
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
803
803
|
* new Monster.Constraint.IsArray()
|
804
804
|
* </script>
|
805
805
|
* ```
|
@@ -808,14 +808,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
808
808
|
*
|
809
809
|
* ```
|
810
810
|
* <script type="module">
|
811
|
-
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
811
|
+
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/isarray.js';
|
812
812
|
* console.log(new IsArray())
|
813
813
|
* </script>
|
814
814
|
* ```
|
815
815
|
*
|
816
816
|
* @example
|
817
817
|
*
|
818
|
-
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
818
|
+
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/isarray.js';
|
819
819
|
*
|
820
820
|
* new IsArray()
|
821
821
|
* .isValid([])
|
@@ -904,7 +904,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
904
904
|
*
|
905
905
|
* ```
|
906
906
|
* <script type="module">
|
907
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
907
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
908
908
|
* Monster.Types.isIterable(null) // ↦ false
|
909
909
|
* Monster.Types.isIterable('hello') // ↦ true
|
910
910
|
* Monster.Types.isIterable([]) // ↦ true
|
@@ -915,7 +915,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
915
915
|
*
|
916
916
|
* ```
|
917
917
|
* <script type="module">
|
918
|
-
* import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
918
|
+
* import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/is.js';
|
919
919
|
* isIterable(null) // ↦ false
|
920
920
|
* isIterable('hello') // ↦ true
|
921
921
|
* isIterable([]) // ↦ true
|
@@ -943,7 +943,7 @@ function isIterable(value) {
|
|
943
943
|
*
|
944
944
|
* ```
|
945
945
|
* <script type="module">
|
946
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
946
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
947
947
|
* Monster.Types.isPrimitive('2') // ↦ false
|
948
948
|
* Monster.Types.isPrimitive([]) // ↦ true
|
949
949
|
* </script>
|
@@ -953,7 +953,7 @@ function isIterable(value) {
|
|
953
953
|
*
|
954
954
|
* ```
|
955
955
|
* <script type="module">
|
956
|
-
* import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
956
|
+
* import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/is.js';
|
957
957
|
* isPrimitive('2')) // ↦ true
|
958
958
|
* isPrimitive([])) // ↦ false
|
959
959
|
* </script>
|
@@ -991,7 +991,7 @@ function isPrimitive(value) {
|
|
991
991
|
*
|
992
992
|
* ```
|
993
993
|
* <script type="module">
|
994
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
994
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
995
995
|
* Monster.Types.isSymbol('2') // ↦ false
|
996
996
|
* Monster.Types.isSymbol(Symbol('test') // ↦ true
|
997
997
|
* </script>
|
@@ -1001,7 +1001,7 @@ function isPrimitive(value) {
|
|
1001
1001
|
*
|
1002
1002
|
* ```
|
1003
1003
|
* <script type="module">
|
1004
|
-
* import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1004
|
+
* import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/is.js';
|
1005
1005
|
* isSymbol(Symbol('a'))) // ↦ true
|
1006
1006
|
* isSymbol([]) // ↦ false
|
1007
1007
|
* </script>
|
@@ -1027,7 +1027,7 @@ function isSymbol(value) {
|
|
1027
1027
|
*
|
1028
1028
|
* ```
|
1029
1029
|
* <script type="module">
|
1030
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1030
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
1031
1031
|
* Monster.Types.isBoolean('2') // ↦ false
|
1032
1032
|
* Monster.Types.isBoolean([]) // ↦ false
|
1033
1033
|
* Monster.Types.isBoolean(true) // ↦ true
|
@@ -1038,7 +1038,7 @@ function isSymbol(value) {
|
|
1038
1038
|
*
|
1039
1039
|
* ```
|
1040
1040
|
* <script type="module">
|
1041
|
-
* import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1041
|
+
* import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/is.js';
|
1042
1042
|
* isBoolean('2')) // ↦ false
|
1043
1043
|
* isBoolean([])) // ↦ false
|
1044
1044
|
* isBoolean(2>4)) // ↦ true
|
@@ -1069,7 +1069,7 @@ function isBoolean(value) {
|
|
1069
1069
|
*
|
1070
1070
|
* ```
|
1071
1071
|
* <script type="module">
|
1072
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1072
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
1073
1073
|
* Monster.Types.isString('2') // ↦ true
|
1074
1074
|
* Monster.Types.isString([]) // ↦ false
|
1075
1075
|
* </script>
|
@@ -1079,7 +1079,7 @@ function isBoolean(value) {
|
|
1079
1079
|
*
|
1080
1080
|
* ```
|
1081
1081
|
* <script type="module">
|
1082
|
-
* import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1082
|
+
* import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/is.js';
|
1083
1083
|
* isString('2')) // ↦ true
|
1084
1084
|
* isString([])) // ↦ false
|
1085
1085
|
* </script>
|
@@ -1109,7 +1109,7 @@ function isString(value) {
|
|
1109
1109
|
*
|
1110
1110
|
* ```
|
1111
1111
|
* <script type="module">
|
1112
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1112
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
1113
1113
|
* Monster.Types.isObject('2') // ↦ false
|
1114
1114
|
* Monster.Types.isObject([]) // ↦ false
|
1115
1115
|
* Monster.Types.isObject({}) // ↦ true
|
@@ -1120,7 +1120,7 @@ function isString(value) {
|
|
1120
1120
|
*
|
1121
1121
|
* ```
|
1122
1122
|
* <script type="module">
|
1123
|
-
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1123
|
+
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/is.js';
|
1124
1124
|
* isObject('2')) // ↦ false
|
1125
1125
|
* isObject([])) // ↦ false
|
1126
1126
|
* </script>
|
@@ -1153,7 +1153,7 @@ function isObject(value) {
|
|
1153
1153
|
*
|
1154
1154
|
* ```
|
1155
1155
|
* <script type="module">
|
1156
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1156
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
1157
1157
|
* Monster.Types.isInstance('2') // ↦ false
|
1158
1158
|
* Monster.Types.isInstance([]) // ↦ false
|
1159
1159
|
* Monster.Types.isInstance({}) // ↦ true
|
@@ -1164,7 +1164,7 @@ function isObject(value) {
|
|
1164
1164
|
*
|
1165
1165
|
* ```
|
1166
1166
|
* <script type="module">
|
1167
|
-
* import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1167
|
+
* import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/is.js';
|
1168
1168
|
* isInstance('2')) // ↦ false
|
1169
1169
|
* isInstance([])) // ↦ false
|
1170
1170
|
* </script>
|
@@ -1194,7 +1194,7 @@ function isInstance(value, instance) {
|
|
1194
1194
|
*
|
1195
1195
|
* ```
|
1196
1196
|
* <script type="module">
|
1197
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1197
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
1198
1198
|
* Monster.Types.isArray('2') // ↦ false
|
1199
1199
|
* Monster.Types.isArray([]) // ↦ true
|
1200
1200
|
* </script>
|
@@ -1204,7 +1204,7 @@ function isInstance(value, instance) {
|
|
1204
1204
|
*
|
1205
1205
|
* ```
|
1206
1206
|
* <script type="module">
|
1207
|
-
* import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1207
|
+
* import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/is.js';
|
1208
1208
|
* isArray('2')) // ↦ false
|
1209
1209
|
* isArray([])) // ↦ true
|
1210
1210
|
* </script>
|
@@ -1231,7 +1231,7 @@ function isArray(value) {
|
|
1231
1231
|
*
|
1232
1232
|
* ```
|
1233
1233
|
* <script type="module">
|
1234
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1234
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
1235
1235
|
* Monster.Types.isFunction(()=>{}) // ↦ true
|
1236
1236
|
* Monster.Types.isFunction('2') // ↦ false
|
1237
1237
|
* Monster.Types.isFunction([]) // ↦ false
|
@@ -1242,7 +1242,7 @@ function isArray(value) {
|
|
1242
1242
|
*
|
1243
1243
|
* ```
|
1244
1244
|
* <script type="module">
|
1245
|
-
* import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1245
|
+
* import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/is.js';
|
1246
1246
|
* isFunction(()=>{}) // ↦ true
|
1247
1247
|
* isFunction('2')) // ↦ false
|
1248
1248
|
* isFunction([])) // ↦ false
|
@@ -1276,7 +1276,7 @@ function isFunction(value) {
|
|
1276
1276
|
*
|
1277
1277
|
* ```
|
1278
1278
|
* <script type="module">
|
1279
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1279
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
1280
1280
|
* Monster.Types.isInteger(()=>{}) // ↦ true
|
1281
1281
|
* Monster.Types.isInteger('2') // ↦ false
|
1282
1282
|
* Monster.Types.isInteger(2) // ↦ true
|
@@ -1287,7 +1287,7 @@ function isFunction(value) {
|
|
1287
1287
|
*
|
1288
1288
|
* ```
|
1289
1289
|
* <script type="module">
|
1290
|
-
* import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1290
|
+
* import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/is.js';
|
1291
1291
|
* isInteger(()=>{}) // ↦ true
|
1292
1292
|
* isInteger('2')) // ↦ false
|
1293
1293
|
* isInteger(2)) // ↦ true
|
@@ -1360,7 +1360,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1360
1360
|
*
|
1361
1361
|
* ```
|
1362
1362
|
* <script type="module">
|
1363
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1363
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
1364
1364
|
* console.log(new Monster.Constraint.IsObject())
|
1365
1365
|
* </script>
|
1366
1366
|
* ```
|
@@ -1369,14 +1369,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1369
1369
|
*
|
1370
1370
|
* ```
|
1371
1371
|
* <script type="module">
|
1372
|
-
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1372
|
+
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/isobject.js';
|
1373
1373
|
* console.log(new IsObject())
|
1374
1374
|
* </script>
|
1375
1375
|
* ```
|
1376
1376
|
*
|
1377
1377
|
* @example
|
1378
1378
|
*
|
1379
|
-
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1379
|
+
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/isobject.js';
|
1380
1380
|
*
|
1381
1381
|
* new IsObject()
|
1382
1382
|
* .isValid({})
|
@@ -1479,7 +1479,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1479
1479
|
*
|
1480
1480
|
* ```
|
1481
1481
|
* <script type="module">
|
1482
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1482
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
1483
1483
|
* new Monster.Constraint.OrOperator();
|
1484
1484
|
* </script>
|
1485
1485
|
* ```
|
@@ -1488,16 +1488,16 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1488
1488
|
*
|
1489
1489
|
* ```
|
1490
1490
|
* <script type="module">
|
1491
|
-
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1491
|
+
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraint/oroperator.js';
|
1492
1492
|
* new OrOperator();
|
1493
1493
|
* </script>
|
1494
1494
|
* ```
|
1495
1495
|
*
|
1496
1496
|
* @example
|
1497
1497
|
*
|
1498
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1499
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1500
|
-
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1498
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/valid.js';
|
1499
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/invalid.js';
|
1500
|
+
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/oroperator.js';
|
1501
1501
|
*
|
1502
1502
|
* new OrOperator(
|
1503
1503
|
* new Valid(), new Invalid()).isValid()
|
@@ -1622,7 +1622,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1622
1622
|
*
|
1623
1623
|
* ```
|
1624
1624
|
* <script type="module">
|
1625
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1625
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
1626
1626
|
* new Monster.Constraint.Valid();
|
1627
1627
|
* </script>
|
1628
1628
|
* ```
|
@@ -1631,14 +1631,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1631
1631
|
*
|
1632
1632
|
* ```
|
1633
1633
|
* <script type="module">
|
1634
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1634
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/valid.js';
|
1635
1635
|
* new Valid();
|
1636
1636
|
* </script>
|
1637
1637
|
* ```
|
1638
1638
|
*
|
1639
1639
|
* @example
|
1640
1640
|
*
|
1641
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1641
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/constraints/valid.js';
|
1642
1642
|
*
|
1643
1643
|
* new Valid().isValid()
|
1644
1644
|
* .then(()=>console.log(true))
|
@@ -1688,6 +1688,7 @@ var Valid = /*#__PURE__*/function (_AbstractConstraint) {
|
|
1688
1688
|
|
1689
1689
|
__webpack_require__.r(__webpack_exports__);
|
1690
1690
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1691
|
+
/* harmony export */ "PARENT": function() { return /* binding */ PARENT; },
|
1691
1692
|
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_0__.Monster; },
|
1692
1693
|
/* harmony export */ "buildMap": function() { return /* binding */ buildMap; },
|
1693
1694
|
/* harmony export */ "assembleParts": function() { return /* binding */ assembleParts; }
|
@@ -1737,6 +1738,11 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1737
1738
|
|
1738
1739
|
|
1739
1740
|
|
1741
|
+
/**
|
1742
|
+
* @type {string} parent symbol
|
1743
|
+
*/
|
1744
|
+
|
1745
|
+
var PARENT = '^';
|
1740
1746
|
/**
|
1741
1747
|
* With the help of the function `buildMap()`, maps can be easily created from data objects.
|
1742
1748
|
*
|
@@ -1747,7 +1753,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1747
1753
|
*
|
1748
1754
|
* ```
|
1749
1755
|
* <script type="module">
|
1750
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1756
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
1751
1757
|
* console.log(Monster.Data.buildMap())
|
1752
1758
|
* </script>
|
1753
1759
|
* ```
|
@@ -1756,7 +1762,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1756
1762
|
*
|
1757
1763
|
* ```
|
1758
1764
|
* <script type="module">
|
1759
|
-
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1765
|
+
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/data/buildmap.js';
|
1760
1766
|
* console.log(buildMap())
|
1761
1767
|
* </script>
|
1762
1768
|
* ```
|
@@ -1767,7 +1773,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1767
1773
|
*
|
1768
1774
|
* @example
|
1769
1775
|
*
|
1770
|
-
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1776
|
+
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/data/buildmap.js';
|
1771
1777
|
* // a typical data structure as reported by an api
|
1772
1778
|
*
|
1773
1779
|
* let map;
|
@@ -1860,6 +1866,7 @@ function buildMap(subject, selector, valueTemplate, keyTemplate, filter) {
|
|
1860
1866
|
* @param {Monster.Data~exampleFilterCallback} [filter]
|
1861
1867
|
* @param {function} callback
|
1862
1868
|
* @return {Map}
|
1869
|
+
* @throws {TypeError} selector is neither a string nor a function
|
1863
1870
|
*/
|
1864
1871
|
|
1865
1872
|
|
@@ -1877,7 +1884,7 @@ function assembleParts(subject, selector, filter, callback) {
|
|
1877
1884
|
map = new Map();
|
1878
1885
|
buildFlatMap.call(map, subject, selector);
|
1879
1886
|
} else {
|
1880
|
-
throw new TypeError('
|
1887
|
+
throw new TypeError('selector is neither a string nor a function');
|
1881
1888
|
}
|
1882
1889
|
|
1883
1890
|
if (!(map instanceof Map)) {
|
@@ -1944,7 +1951,7 @@ function buildFlatMap(subject, selector, key, parentMap) {
|
|
1944
1951
|
var sub = buildFlatMap.call(result, o, parts.join(_pathfinder_js__WEBPACK_IMPORTED_MODULE_4__.DELIMITER), copyKey, o);
|
1945
1952
|
|
1946
1953
|
if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_1__.isObject)(sub) && parentMap !== undefined) {
|
1947
|
-
sub[
|
1954
|
+
sub[PARENT] = parentMap;
|
1948
1955
|
}
|
1949
1956
|
|
1950
1957
|
currentMap.set(kk, sub);
|
@@ -1997,7 +2004,7 @@ function buildFlatMap(subject, selector, key, parentMap) {
|
|
1997
2004
|
* Alternatively to a string selector a callback can be specified. this must return a map.
|
1998
2005
|
*
|
1999
2006
|
* @example
|
2000
|
-
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2007
|
+
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/data/buildmap.js';
|
2001
2008
|
*
|
2002
2009
|
* let obj = {
|
2003
2010
|
* "data": [
|
@@ -2200,7 +2207,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
2200
2207
|
*
|
2201
2208
|
* ```
|
2202
2209
|
* <script type="module">
|
2203
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2210
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2204
2211
|
* console.log(Monster.Types.validateIterable('2')) // ↦ TypeError
|
2205
2212
|
* console.log(Monster.Types.validateIterable([])) // ↦ value
|
2206
2213
|
* </script>
|
@@ -2210,7 +2217,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
2210
2217
|
*
|
2211
2218
|
* ```
|
2212
2219
|
* <script type="module">
|
2213
|
-
* import {validateIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2220
|
+
* import {validateIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/validate.js';
|
2214
2221
|
* console.log(validateIterable('2')) // ↦ TypeError
|
2215
2222
|
* console.log(validateIterable([])) // ↦ value
|
2216
2223
|
* </script>
|
@@ -2241,7 +2248,7 @@ function validateIterable(value) {
|
|
2241
2248
|
*
|
2242
2249
|
* ```
|
2243
2250
|
* <script type="module">
|
2244
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2251
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2245
2252
|
* console.log(Monster.Types.validatePrimitive('2')) // ↦ value
|
2246
2253
|
* console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError
|
2247
2254
|
* </script>
|
@@ -2251,7 +2258,7 @@ function validateIterable(value) {
|
|
2251
2258
|
*
|
2252
2259
|
* ```
|
2253
2260
|
* <script type="module">
|
2254
|
-
* import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2261
|
+
* import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/validate.js';
|
2255
2262
|
* console.log(validatePrimitive('2')) // ↦ value
|
2256
2263
|
* console.log(validatePrimitive([])) // ↦ TypeError
|
2257
2264
|
* </script>
|
@@ -2283,7 +2290,7 @@ function validatePrimitive(value) {
|
|
2283
2290
|
*
|
2284
2291
|
* ```
|
2285
2292
|
* <script type="module">
|
2286
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2293
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2287
2294
|
* console.log(Monster.Types.validateBoolean(true)) // ↦ value
|
2288
2295
|
* console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError
|
2289
2296
|
* console.log(Monster.Types.validateBoolean([])) // ↦ TypeError
|
@@ -2294,7 +2301,7 @@ function validatePrimitive(value) {
|
|
2294
2301
|
*
|
2295
2302
|
* ```
|
2296
2303
|
* <script type="module">
|
2297
|
-
* import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2304
|
+
* import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/validate.js';
|
2298
2305
|
* console.log(validateBoolean(false)) // ↦ value
|
2299
2306
|
* console.log(validateBoolean('2')) // ↦ TypeError
|
2300
2307
|
* console.log(validateBoolean([])) // ↦ TypeError
|
@@ -2325,7 +2332,7 @@ function validateBoolean(value) {
|
|
2325
2332
|
*
|
2326
2333
|
* ```
|
2327
2334
|
* <script type="module">
|
2328
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2335
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2329
2336
|
* console.log(Monster.Types.validateString('2')) // ↦ value
|
2330
2337
|
* console.log(Monster.Types.validateString([])) // ↦ TypeError
|
2331
2338
|
* </script>
|
@@ -2335,7 +2342,7 @@ function validateBoolean(value) {
|
|
2335
2342
|
*
|
2336
2343
|
* ```
|
2337
2344
|
* <script type="module">
|
2338
|
-
* import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2345
|
+
* import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/validate.js';
|
2339
2346
|
* console.log(validateString('2')) // ↦ value
|
2340
2347
|
* console.log(validateString([])) // ↦ TypeError
|
2341
2348
|
* </script>
|
@@ -2364,7 +2371,7 @@ function validateString(value) {
|
|
2364
2371
|
*
|
2365
2372
|
* ```
|
2366
2373
|
* <script type="module">
|
2367
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2374
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2368
2375
|
* console.log(Monster.Types.validateObject({})) // ↦ value
|
2369
2376
|
* console.log(Monster.Types.validateObject('2')) // ↦ TypeError
|
2370
2377
|
* console.log(Monster.Types.validateObject([])) // ↦ TypeError
|
@@ -2375,7 +2382,7 @@ function validateString(value) {
|
|
2375
2382
|
*
|
2376
2383
|
* ```
|
2377
2384
|
* <script type="module">
|
2378
|
-
* import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2385
|
+
* import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/validate.js';
|
2379
2386
|
* console.log(validateObject({})) // ↦ value
|
2380
2387
|
* console.log(validateObject('2')) // ↦ TypeError
|
2381
2388
|
* console.log(validateObject([])) // ↦ TypeError
|
@@ -2405,7 +2412,7 @@ function validateObject(value) {
|
|
2405
2412
|
*
|
2406
2413
|
* ```
|
2407
2414
|
* <script type="module">
|
2408
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2415
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2409
2416
|
* console.log(Monster.Types.validateInstance({}, Object)) // ↦ value
|
2410
2417
|
* console.log(Monster.Types.validateInstance('2', Object)) // ↦ TypeError
|
2411
2418
|
* console.log(Monster.Types.validateInstance([], Object)) // ↦ TypeError
|
@@ -2416,7 +2423,7 @@ function validateObject(value) {
|
|
2416
2423
|
*
|
2417
2424
|
* ```
|
2418
2425
|
* <script type="module">
|
2419
|
-
* import {validateInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2426
|
+
* import {validateInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/validate.js';
|
2420
2427
|
* console.log(validateInstance({}, Object)) // ↦ value
|
2421
2428
|
* console.log(validateInstance('2', Object)) // ↦ TypeError
|
2422
2429
|
* console.log(validateInstance([], Object)) // ↦ TypeError
|
@@ -2456,7 +2463,7 @@ function validateInstance(value, instance) {
|
|
2456
2463
|
*
|
2457
2464
|
* ```
|
2458
2465
|
* <script type="module">
|
2459
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2466
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2460
2467
|
* console.log(Monster.Types.validateArray('2')) // ↦ TypeError
|
2461
2468
|
* console.log(Monster.Types.validateArray([])) // ↦ value
|
2462
2469
|
* </script>
|
@@ -2466,7 +2473,7 @@ function validateInstance(value, instance) {
|
|
2466
2473
|
*
|
2467
2474
|
* ```
|
2468
2475
|
* <script type="module">
|
2469
|
-
* import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2476
|
+
* import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/validate.js';
|
2470
2477
|
* console.log(validateArray('2')) // ↦ TypeError
|
2471
2478
|
* console.log(validateArray([])) // ↦ value
|
2472
2479
|
* </script>
|
@@ -2495,7 +2502,7 @@ function validateArray(value) {
|
|
2495
2502
|
*
|
2496
2503
|
* ```
|
2497
2504
|
* <script type="module">
|
2498
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2505
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2499
2506
|
* console.log(Monster.Types.validateSymbol('2')) // ↦ TypeError
|
2500
2507
|
* console.log(Monster.Types.validateSymbol([])) // ↦ value
|
2501
2508
|
* </script>
|
@@ -2505,7 +2512,7 @@ function validateArray(value) {
|
|
2505
2512
|
*
|
2506
2513
|
* ```
|
2507
2514
|
* <script type="module">
|
2508
|
-
* import {validateSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2515
|
+
* import {validateSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/validate.js';
|
2509
2516
|
* console.log(validateSymbol('2')) // ↦ TypeError
|
2510
2517
|
* console.log(validateSymbol()) // ↦ value
|
2511
2518
|
* </script>
|
@@ -2534,7 +2541,7 @@ function validateSymbol(value) {
|
|
2534
2541
|
*
|
2535
2542
|
* ```
|
2536
2543
|
* <script type="module">
|
2537
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2544
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2538
2545
|
* console.log(Monster.Types.validateFunction(()=>{})) // ↦ value
|
2539
2546
|
* console.log(Monster.Types.validateFunction('2')) // ↦ TypeError
|
2540
2547
|
* console.log(Monster.Types.validateFunction([])) // ↦ TypeError
|
@@ -2545,7 +2552,7 @@ function validateSymbol(value) {
|
|
2545
2552
|
*
|
2546
2553
|
* ```
|
2547
2554
|
* <script type="module">
|
2548
|
-
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2555
|
+
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/validate.js';
|
2549
2556
|
* console.log(validateFunction(()=>{})) // ↦ value
|
2550
2557
|
* console.log(validateFunction('2')) // ↦ TypeError
|
2551
2558
|
* console.log(validateFunction([])) // ↦ TypeError
|
@@ -2575,7 +2582,7 @@ function validateFunction(value) {
|
|
2575
2582
|
*
|
2576
2583
|
* ```
|
2577
2584
|
* <script type="module">
|
2578
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2585
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2579
2586
|
* console.log(Monster.Types.validateInteger(true)) // ↦ TypeError
|
2580
2587
|
* console.log(Monster.Types.validateInteger('2')) // ↦ TypeError
|
2581
2588
|
* console.log(Monster.Types.validateInteger(2)) // ↦ value
|
@@ -2586,7 +2593,7 @@ function validateFunction(value) {
|
|
2586
2593
|
*
|
2587
2594
|
* ```
|
2588
2595
|
* <script type="module">
|
2589
|
-
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2596
|
+
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/validate.js';
|
2590
2597
|
* console.log(validateInteger(true)) // ↦ TypeError
|
2591
2598
|
* console.log(validateInteger('2')) // ↦ TypeError
|
2592
2599
|
* console.log(validateInteger(2)) // ↦ value
|
@@ -2652,7 +2659,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
2652
2659
|
*
|
2653
2660
|
* ```
|
2654
2661
|
* <script type="module">
|
2655
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2662
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2656
2663
|
* Monster.Util.clone({})
|
2657
2664
|
* </script>
|
2658
2665
|
* ```
|
@@ -2661,7 +2668,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
2661
2668
|
*
|
2662
2669
|
* ```
|
2663
2670
|
* <script type="module">
|
2664
|
-
* import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2671
|
+
* import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/util/clone.js';
|
2665
2672
|
* clone({})
|
2666
2673
|
* </script>
|
2667
2674
|
* ```
|
@@ -2873,7 +2880,7 @@ function getGlobal() {
|
|
2873
2880
|
*
|
2874
2881
|
* ```
|
2875
2882
|
* <script type="module">
|
2876
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2883
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2877
2884
|
* Monster.Types.getGlobalObject('document')
|
2878
2885
|
* // ↦ { }
|
2879
2886
|
* </script>
|
@@ -2883,7 +2890,7 @@ function getGlobal() {
|
|
2883
2890
|
*
|
2884
2891
|
* ```
|
2885
2892
|
* <script type="module">
|
2886
|
-
* import {getGlobalObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2893
|
+
* import {getGlobalObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/global.js';
|
2887
2894
|
* getGlobalObject('document')
|
2888
2895
|
* // ↦ { }
|
2889
2896
|
* </script>
|
@@ -2915,7 +2922,7 @@ function getGlobalObject(name) {
|
|
2915
2922
|
*
|
2916
2923
|
* ```
|
2917
2924
|
* <script type="module">
|
2918
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2925
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2919
2926
|
* console.log(Monster.Types.getGlobalFunction('parseInt')) // ↦ f parseInt() { }
|
2920
2927
|
* </script>
|
2921
2928
|
* ```
|
@@ -2924,7 +2931,7 @@ function getGlobalObject(name) {
|
|
2924
2931
|
*
|
2925
2932
|
* ```
|
2926
2933
|
* <script type="module">
|
2927
|
-
* import {getGlobalFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2934
|
+
* import {getGlobalFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/global.js';
|
2928
2935
|
* console.log(getGlobalFunction('parseInt')) // ↦ f parseInt() { }
|
2929
2936
|
* </script>
|
2930
2937
|
* ```
|
@@ -2975,7 +2982,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
2975
2982
|
*
|
2976
2983
|
* ```
|
2977
2984
|
* <script type="module">
|
2978
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2985
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
2979
2986
|
* console.log(Monster.Types.typeOf())
|
2980
2987
|
* </script>
|
2981
2988
|
* ```
|
@@ -2984,14 +2991,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
2984
2991
|
*
|
2985
2992
|
* ```
|
2986
2993
|
* <script type="module">
|
2987
|
-
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2994
|
+
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/typeof.js';
|
2988
2995
|
* console.log(typeOf())
|
2989
2996
|
* </script>
|
2990
2997
|
* ```
|
2991
2998
|
*
|
2992
2999
|
* @example
|
2993
3000
|
*
|
2994
|
-
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3001
|
+
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/typeof.js';
|
2995
3002
|
*
|
2996
3003
|
* console.log(typeOf(undefined)); // ↦ undefined
|
2997
3004
|
* console.log(typeOf("")); // ↦ string
|
@@ -3110,7 +3117,7 @@ var WILDCARD = '*';
|
|
3110
3117
|
*
|
3111
3118
|
* ```
|
3112
3119
|
* <script type="module">
|
3113
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3120
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
3114
3121
|
* console.log(new Monster.Data.Pathfinder())
|
3115
3122
|
* </script>
|
3116
3123
|
* ```
|
@@ -3119,7 +3126,7 @@ var WILDCARD = '*';
|
|
3119
3126
|
*
|
3120
3127
|
* ```
|
3121
3128
|
* <script type="module">
|
3122
|
-
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3129
|
+
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/data/pathfinder.js';
|
3123
3130
|
* console.log(new Pathfinder())
|
3124
3131
|
* </script>
|
3125
3132
|
* ```
|
@@ -3161,7 +3168,7 @@ var WILDCARD = '*';
|
|
3161
3168
|
*
|
3162
3169
|
* @example
|
3163
3170
|
*
|
3164
|
-
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3171
|
+
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/data/pathfinder.js';
|
3165
3172
|
*
|
3166
3173
|
* let value = new Pathfinder({
|
3167
3174
|
* a: {
|
@@ -3187,7 +3194,7 @@ var WILDCARD = '*';
|
|
3187
3194
|
*
|
3188
3195
|
* @example
|
3189
3196
|
*
|
3190
|
-
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3197
|
+
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/data/pathfinder.js';
|
3191
3198
|
*
|
3192
3199
|
* let p = new Pathfinder({
|
3193
3200
|
* a: {
|
@@ -3602,7 +3609,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
3602
3609
|
*
|
3603
3610
|
* ```
|
3604
3611
|
* <script type="module">
|
3605
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3612
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
3606
3613
|
* console.log(new Monster.Types.Stack())
|
3607
3614
|
* </script>
|
3608
3615
|
* ```
|
@@ -3611,7 +3618,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
3611
3618
|
*
|
3612
3619
|
* ```
|
3613
3620
|
* <script type="module">
|
3614
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3621
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/stack.js';
|
3615
3622
|
* console.log(new Stack())
|
3616
3623
|
* </script>
|
3617
3624
|
* ```
|
@@ -3746,7 +3753,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
3746
3753
|
*
|
3747
3754
|
* ```
|
3748
3755
|
* <script type="module">
|
3749
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3756
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
3750
3757
|
* Monster.Data.Diff(a, b)
|
3751
3758
|
* </script>
|
3752
3759
|
* ```
|
@@ -3755,14 +3762,14 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
3755
3762
|
*
|
3756
3763
|
* ```
|
3757
3764
|
* <script type="module">
|
3758
|
-
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3765
|
+
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/data/diff.js';
|
3759
3766
|
* Diff(a, b)
|
3760
3767
|
* </script>
|
3761
3768
|
* ```
|
3762
3769
|
*
|
3763
3770
|
* @example
|
3764
3771
|
*
|
3765
|
-
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3772
|
+
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/data/diff.js';
|
3766
3773
|
*
|
3767
3774
|
* // given are two objects x and y.
|
3768
3775
|
*
|
@@ -4008,7 +4015,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
4008
4015
|
*
|
4009
4016
|
* ```
|
4010
4017
|
* <script type="module">
|
4011
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4018
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
4012
4019
|
* Monster.Data.extend(a, b)
|
4013
4020
|
* </script>
|
4014
4021
|
* ```
|
@@ -4017,7 +4024,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
4017
4024
|
*
|
4018
4025
|
* ```
|
4019
4026
|
* <script type="module">
|
4020
|
-
* import {extend} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4027
|
+
* import {extend} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/data/extend.js';
|
4021
4028
|
* extend(a, b)
|
4022
4029
|
* </script>
|
4023
4030
|
* ```
|
@@ -4146,7 +4153,7 @@ var DELIMITER = '|';
|
|
4146
4153
|
*
|
4147
4154
|
* ```
|
4148
4155
|
* <script type="module">
|
4149
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4156
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
4150
4157
|
* new Monster.Data.Pipe()
|
4151
4158
|
* </script>
|
4152
4159
|
* ```
|
@@ -4155,7 +4162,7 @@ var DELIMITER = '|';
|
|
4155
4162
|
*
|
4156
4163
|
* ```
|
4157
4164
|
* <script type="module">
|
4158
|
-
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4165
|
+
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/data/pipe.js';
|
4159
4166
|
* new Pipe()
|
4160
4167
|
* </script>
|
4161
4168
|
* ```
|
@@ -4166,7 +4173,7 @@ var DELIMITER = '|';
|
|
4166
4173
|
* the word is then converted to uppercase letters and a prefix Hello is added. the two backslash safe the space char.
|
4167
4174
|
*
|
4168
4175
|
* @example
|
4169
|
-
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4176
|
+
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/data/pipe.js';
|
4170
4177
|
*
|
4171
4178
|
* let obj = {
|
4172
4179
|
* a: {
|
@@ -4328,7 +4335,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
4328
4335
|
*
|
4329
4336
|
* ```
|
4330
4337
|
* <script type="module">
|
4331
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4338
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
4332
4339
|
* new Monster.Data.Transformer()
|
4333
4340
|
* </script>
|
4334
4341
|
* ```
|
@@ -4337,7 +4344,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
4337
4344
|
*
|
4338
4345
|
* ```
|
4339
4346
|
* <script type="module">
|
4340
|
-
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4347
|
+
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/data/transformer.js';
|
4341
4348
|
* new Transformer()
|
4342
4349
|
* </script>
|
4343
4350
|
* ```
|
@@ -4423,7 +4430,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
4423
4430
|
*
|
4424
4431
|
* @example
|
4425
4432
|
*
|
4426
|
-
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4433
|
+
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/data/transformer.js';
|
4427
4434
|
*
|
4428
4435
|
* const transformer = new Transformer("tolower")
|
4429
4436
|
*
|
@@ -4956,7 +4963,7 @@ var internalCounter = new Map();
|
|
4956
4963
|
*
|
4957
4964
|
* ```
|
4958
4965
|
* <script type="module">
|
4959
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4966
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
4960
4967
|
* console.log(new Monster.Types.ID())
|
4961
4968
|
* </script>
|
4962
4969
|
* ```
|
@@ -4965,7 +4972,7 @@ var internalCounter = new Map();
|
|
4965
4972
|
*
|
4966
4973
|
* ```
|
4967
4974
|
* <script type="module">
|
4968
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4975
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/id.js';
|
4969
4976
|
* console.log(new ID())
|
4970
4977
|
* </script>
|
4971
4978
|
* ```
|
@@ -5088,7 +5095,7 @@ var ATTRIBUTEPREFIX = "data-monster-";
|
|
5088
5095
|
*
|
5089
5096
|
* ```
|
5090
5097
|
* <script type="module">
|
5091
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5098
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
5092
5099
|
* console.log(new Monster.DOM.Assembler())
|
5093
5100
|
* </script>
|
5094
5101
|
* ```
|
@@ -5097,7 +5104,7 @@ var ATTRIBUTEPREFIX = "data-monster-";
|
|
5097
5104
|
*
|
5098
5105
|
* ```
|
5099
5106
|
* <script type="module">
|
5100
|
-
* import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5107
|
+
* import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/assembler.js';
|
5101
5108
|
* console.log(new Assembler())
|
5102
5109
|
* </script>
|
5103
5110
|
* ```
|
@@ -5238,7 +5245,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5238
5245
|
*
|
5239
5246
|
* ```
|
5240
5247
|
* <script type="module">
|
5241
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5248
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
5242
5249
|
* new Monster.Types.ProxyObserver()
|
5243
5250
|
* </script>
|
5244
5251
|
* ```
|
@@ -5247,7 +5254,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5247
5254
|
*
|
5248
5255
|
* ```
|
5249
5256
|
* <script type="module">
|
5250
|
-
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5257
|
+
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/proxyobserver.js';
|
5251
5258
|
* new ProxyObserver()
|
5252
5259
|
* </script>
|
5253
5260
|
* ```
|
@@ -5258,9 +5265,9 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5258
5265
|
*
|
5259
5266
|
* @example
|
5260
5267
|
*
|
5261
|
-
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5262
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5263
|
-
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5268
|
+
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/proxyobserver.js';
|
5269
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/observer.js';
|
5270
|
+
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/is.js';
|
5264
5271
|
*
|
5265
5272
|
* const o = new Observer(function () {
|
5266
5273
|
* if (isObject(this) && this instanceof ProxyObserver) {
|
@@ -5585,26 +5592,21 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5585
5592
|
* You can call the method via the monster namespace `new Monster.Types.Observer()`.
|
5586
5593
|
*
|
5587
5594
|
* ```
|
5588
|
-
*
|
5589
|
-
*
|
5590
|
-
* console.log(new Monster.Types.Observer())
|
5591
|
-
* </script>
|
5595
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
5596
|
+
* new Monster.Types.Observer()
|
5592
5597
|
* ```
|
5593
5598
|
*
|
5594
5599
|
* Alternatively, you can also integrate this function individually.
|
5595
5600
|
*
|
5596
5601
|
* ```
|
5597
|
-
*
|
5598
|
-
*
|
5599
|
-
* console.log(new Observer())
|
5600
|
-
* </script>
|
5602
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/observer.js';
|
5603
|
+
* new Observer()
|
5601
5604
|
* ```
|
5602
5605
|
*
|
5603
5606
|
* The update method is called with the subject object as this pointer. For this reason the callback should not
|
5604
5607
|
* be an arrow function, because it gets the this pointer of its own context.
|
5605
5608
|
*
|
5606
5609
|
* ```
|
5607
|
-
* <script>
|
5608
5610
|
* new Observer(()=>{
|
5609
5611
|
* // this is not subject
|
5610
5612
|
* })
|
@@ -5612,24 +5614,21 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5612
5614
|
* new Observer(function() {
|
5613
5615
|
* // this is subject
|
5614
5616
|
* })
|
5615
|
-
* </script>
|
5616
5617
|
* ```
|
5617
5618
|
*
|
5618
5619
|
* Additional arguments can be passed to the callback. To do this, simply specify them.
|
5619
5620
|
*
|
5620
5621
|
* ```
|
5621
|
-
* <script>
|
5622
5622
|
* Observer(function(a, b, c) {
|
5623
5623
|
* console.log(a, b, c); // ↦ "a", 2, true
|
5624
5624
|
* }, "a", 2, true)
|
5625
|
-
* </script>
|
5626
5625
|
* ```
|
5627
5626
|
*
|
5628
5627
|
* The callback function must have as many parameters as arguments are given.
|
5629
5628
|
*
|
5630
5629
|
* @example
|
5631
5630
|
*
|
5632
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5631
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/observer.js';
|
5633
5632
|
*
|
5634
5633
|
* const observer = new Observer(function(a, b, c) {
|
5635
5634
|
* console.log(this, a, b, c); // ↦ "a", 2, true
|
@@ -5829,7 +5828,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5829
5828
|
*
|
5830
5829
|
* ```
|
5831
5830
|
* <script type="module">
|
5832
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5831
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
5833
5832
|
* new Monster.Types.TokenList("myclass row")
|
5834
5833
|
* </script>
|
5835
5834
|
* ```
|
@@ -5838,7 +5837,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5838
5837
|
*
|
5839
5838
|
* ```
|
5840
5839
|
* <script type="module">
|
5841
|
-
* import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5840
|
+
* import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/tokenlist.js';
|
5842
5841
|
* new TokenList("myclass row")
|
5843
5842
|
* </script>
|
5844
5843
|
* ```
|
@@ -6261,7 +6260,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6261
6260
|
*
|
6262
6261
|
* ```
|
6263
6262
|
* <script type="module">
|
6264
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6263
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
6265
6264
|
* new Monster.Types.UniqueQueue()
|
6266
6265
|
* </script>
|
6267
6266
|
* ```
|
@@ -6270,7 +6269,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6270
6269
|
*
|
6271
6270
|
* ```
|
6272
6271
|
* <script type="module">
|
6273
|
-
* import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6272
|
+
* import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/uniquequeue.js';
|
6274
6273
|
* new UniqueQueue()
|
6275
6274
|
* </script>
|
6276
6275
|
* ```
|
@@ -6405,7 +6404,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6405
6404
|
*
|
6406
6405
|
* ```
|
6407
6406
|
* <script type="module">
|
6408
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6407
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
6409
6408
|
* new Monster.Types.Queue()
|
6410
6409
|
* </script>
|
6411
6410
|
* ```
|
@@ -6414,14 +6413,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6414
6413
|
*
|
6415
6414
|
* ```
|
6416
6415
|
* <script type="module">
|
6417
|
-
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6416
|
+
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/queue.js';
|
6418
6417
|
* new Queue()
|
6419
6418
|
* </script>
|
6420
6419
|
* ```
|
6421
6420
|
*
|
6422
6421
|
* @example
|
6423
6422
|
*
|
6424
|
-
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6423
|
+
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/queue.js';
|
6425
6424
|
*
|
6426
6425
|
* const queue = new Queue;
|
6427
6426
|
*
|
@@ -6590,7 +6589,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6590
6589
|
*
|
6591
6590
|
* ```
|
6592
6591
|
* <script type="module">
|
6593
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6592
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
6594
6593
|
* console.log(new Monster.Types.ObserverList())
|
6595
6594
|
* console.log(new Monster.Types.ObserverList())
|
6596
6595
|
* </script>
|
@@ -6600,7 +6599,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6600
6599
|
*
|
6601
6600
|
* ```
|
6602
6601
|
* <script type="module">
|
6603
|
-
* import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6602
|
+
* import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/observerlist.js';
|
6604
6603
|
* console.log(ObserverList())
|
6605
6604
|
* console.log(ObserverList())
|
6606
6605
|
* </script>
|
@@ -6760,7 +6759,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
6760
6759
|
*
|
6761
6760
|
* ```
|
6762
6761
|
* <script type="module">
|
6763
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6762
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
6764
6763
|
* console.log(Monster.DOM.findClosestObjectLink())
|
6765
6764
|
* </script>
|
6766
6765
|
* ```
|
@@ -6769,7 +6768,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
6769
6768
|
*
|
6770
6769
|
* ```
|
6771
6770
|
* <script type="module">
|
6772
|
-
* import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6771
|
+
* import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/updater.js';
|
6773
6772
|
* console.log(findClosestObjectLink())
|
6774
6773
|
* </script>
|
6775
6774
|
* ```
|
@@ -6790,7 +6789,7 @@ function findClosestObjectLink(element) {
|
|
6790
6789
|
*
|
6791
6790
|
* ```
|
6792
6791
|
* <script type="module">
|
6793
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6792
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
6794
6793
|
* Monster.DOM.addToObjectLink();
|
6795
6794
|
* </script>
|
6796
6795
|
* ```
|
@@ -6799,7 +6798,7 @@ function findClosestObjectLink(element) {
|
|
6799
6798
|
*
|
6800
6799
|
* ```
|
6801
6800
|
* <script type="module">
|
6802
|
-
* import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6801
|
+
* import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/attributes.js';
|
6803
6802
|
* addToObjectLink();
|
6804
6803
|
* </script>
|
6805
6804
|
* ```
|
@@ -6831,7 +6830,7 @@ function addToObjectLink(element, symbol, object) {
|
|
6831
6830
|
*
|
6832
6831
|
* ```
|
6833
6832
|
* <script type="module">
|
6834
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6833
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
6835
6834
|
* Monster.DOM.removeObjectLink();
|
6836
6835
|
* </script>
|
6837
6836
|
* ```
|
@@ -6840,7 +6839,7 @@ function addToObjectLink(element, symbol, object) {
|
|
6840
6839
|
*
|
6841
6840
|
* ```
|
6842
6841
|
* <script type="module">
|
6843
|
-
* import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6842
|
+
* import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/attributes.js';
|
6844
6843
|
* removeObjectLink();
|
6845
6844
|
* </script>
|
6846
6845
|
* ```
|
@@ -6871,7 +6870,7 @@ function removeObjectLink(element, symbol) {
|
|
6871
6870
|
*
|
6872
6871
|
* ```
|
6873
6872
|
* <script type="module">
|
6874
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6873
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
6875
6874
|
* Monster.DOM.hasObjectLink();
|
6876
6875
|
* </script>
|
6877
6876
|
* ```
|
@@ -6880,7 +6879,7 @@ function removeObjectLink(element, symbol) {
|
|
6880
6879
|
*
|
6881
6880
|
* ```
|
6882
6881
|
* <script type="module">
|
6883
|
-
* import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6882
|
+
* import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/attributes.js';
|
6884
6883
|
* hasObjectLink();
|
6885
6884
|
* </script>
|
6886
6885
|
* ```
|
@@ -6916,7 +6915,7 @@ function hasObjectLink(element, symbol) {
|
|
6916
6915
|
*
|
6917
6916
|
* ```
|
6918
6917
|
* <script type="module">
|
6919
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6918
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
6920
6919
|
* Monster.DOM.getLinkedObjects();
|
6921
6920
|
* </script>
|
6922
6921
|
* ```
|
@@ -6925,7 +6924,7 @@ function hasObjectLink(element, symbol) {
|
|
6925
6924
|
*
|
6926
6925
|
* ```
|
6927
6926
|
* <script type="module">
|
6928
|
-
* import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6927
|
+
* import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/attributes.js';
|
6929
6928
|
* getLinkedObjects();
|
6930
6929
|
* </script>
|
6931
6930
|
* ```
|
@@ -6959,7 +6958,7 @@ function getLinkedObjects(element, symbol) {
|
|
6959
6958
|
*
|
6960
6959
|
* ```
|
6961
6960
|
* <script type="module">
|
6962
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6961
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
6963
6962
|
* Monster.DOM.toggleAttributeToken();
|
6964
6963
|
* </script>
|
6965
6964
|
* ```
|
@@ -6968,7 +6967,7 @@ function getLinkedObjects(element, symbol) {
|
|
6968
6967
|
*
|
6969
6968
|
* ```
|
6970
6969
|
* <script type="module">
|
6971
|
-
* import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6970
|
+
* import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/attributes.js';
|
6972
6971
|
* toggleAttributeToken();
|
6973
6972
|
* </script>
|
6974
6973
|
* ```
|
@@ -6997,13 +6996,13 @@ function toggleAttributeToken(element, key, token) {
|
|
6997
6996
|
return element;
|
6998
6997
|
}
|
6999
6998
|
/**
|
7000
|
-
*
|
6999
|
+
* This method can be used to add a token to an attribute. Tokens are always separated by a space.
|
7001
7000
|
*
|
7002
7001
|
* You can call the method via the monster namespace `new Monster.DOM.addAttributeToken()`.
|
7003
7002
|
*
|
7004
7003
|
* ```
|
7005
7004
|
* <script type="module">
|
7006
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7005
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
7007
7006
|
* Monster.DOM.addAttributeToken();
|
7008
7007
|
* </script>
|
7009
7008
|
* ```
|
@@ -7012,7 +7011,7 @@ function toggleAttributeToken(element, key, token) {
|
|
7012
7011
|
*
|
7013
7012
|
* ```
|
7014
7013
|
* <script type="module">
|
7015
|
-
* import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7014
|
+
* import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/attributes.js';
|
7016
7015
|
* addAttributeToken();
|
7017
7016
|
* </script>
|
7018
7017
|
* ```
|
@@ -7049,7 +7048,7 @@ function addAttributeToken(element, key, token) {
|
|
7049
7048
|
*
|
7050
7049
|
* ```
|
7051
7050
|
* <script type="module">
|
7052
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7051
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
7053
7052
|
* Monster.DOM.removeAttributeToken();
|
7054
7053
|
* </script>
|
7055
7054
|
* ```
|
@@ -7058,7 +7057,7 @@ function addAttributeToken(element, key, token) {
|
|
7058
7057
|
*
|
7059
7058
|
* ```
|
7060
7059
|
* <script type="module">
|
7061
|
-
* import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7060
|
+
* import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/attributes.js';
|
7062
7061
|
* removeAttributeToken();
|
7063
7062
|
* </script>
|
7064
7063
|
* ```
|
@@ -7094,7 +7093,7 @@ function removeAttributeToken(element, key, token) {
|
|
7094
7093
|
*
|
7095
7094
|
* ```
|
7096
7095
|
* <script type="module">
|
7097
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7096
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
7098
7097
|
* Monster.DOM.containsAttributeToken();
|
7099
7098
|
* </script>
|
7100
7099
|
* ```
|
@@ -7103,7 +7102,7 @@ function removeAttributeToken(element, key, token) {
|
|
7103
7102
|
*
|
7104
7103
|
* ```
|
7105
7104
|
* <script type="module">
|
7106
|
-
* import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7105
|
+
* import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/attributes.js';
|
7107
7106
|
* containsAttributeToken();
|
7108
7107
|
* </script>
|
7109
7108
|
* ```
|
@@ -7136,7 +7135,7 @@ function containsAttributeToken(element, key, token) {
|
|
7136
7135
|
*
|
7137
7136
|
* ```
|
7138
7137
|
* <script type="module">
|
7139
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7138
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
7140
7139
|
* Monster.DOM.replaceAttributeToken();
|
7141
7140
|
* </script>
|
7142
7141
|
* ```
|
@@ -7145,7 +7144,7 @@ function containsAttributeToken(element, key, token) {
|
|
7145
7144
|
*
|
7146
7145
|
* ```
|
7147
7146
|
* <script type="module">
|
7148
|
-
* import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7147
|
+
* import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/attributes.js';
|
7149
7148
|
* replaceAttributeToken();
|
7150
7149
|
* </script>
|
7151
7150
|
* ```
|
@@ -7181,7 +7180,7 @@ function replaceAttributeToken(element, key, from, to) {
|
|
7181
7180
|
*
|
7182
7181
|
* ```
|
7183
7182
|
* <script type="module">
|
7184
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7183
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
7185
7184
|
* Monster.DOM.clearAttributeTokens();
|
7186
7185
|
* </script>
|
7187
7186
|
* ```
|
@@ -7190,7 +7189,7 @@ function replaceAttributeToken(element, key, from, to) {
|
|
7190
7189
|
*
|
7191
7190
|
* ```
|
7192
7191
|
* <script type="module">
|
7193
|
-
* import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7192
|
+
* import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/attributes.js';
|
7194
7193
|
* clearAttributeTokens();
|
7195
7194
|
* </script>
|
7196
7195
|
* ```
|
@@ -7238,7 +7237,7 @@ function clearAttributeTokens(element, key) {
|
|
7238
7237
|
*
|
7239
7238
|
* ```
|
7240
7239
|
* <script type="module">
|
7241
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7240
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
7242
7241
|
* Monster.DOM.findClosestByAttribute();
|
7243
7242
|
* </script>
|
7244
7243
|
* ```
|
@@ -7247,7 +7246,7 @@ function clearAttributeTokens(element, key) {
|
|
7247
7246
|
*
|
7248
7247
|
* ```
|
7249
7248
|
* <script type="module">
|
7250
|
-
* import {findClosestByAttribute} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7249
|
+
* import {findClosestByAttribute} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/attributes.js';
|
7251
7250
|
* findClosestByAttribute();
|
7252
7251
|
* </script>
|
7253
7252
|
* ```
|
@@ -7305,7 +7304,7 @@ function findClosestByAttribute(element, key, value) {
|
|
7305
7304
|
*
|
7306
7305
|
* ```
|
7307
7306
|
* <script type="module">
|
7308
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7307
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
7309
7308
|
* Monster.DOM.findClosestByClass();
|
7310
7309
|
* </script>
|
7311
7310
|
* ```
|
@@ -7314,7 +7313,7 @@ function findClosestByAttribute(element, key, value) {
|
|
7314
7313
|
*
|
7315
7314
|
* ```
|
7316
7315
|
* <script type="module">
|
7317
|
-
* import {findClosestByClass} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7316
|
+
* import {findClosestByClass} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/attributes.js';
|
7318
7317
|
* findClosestByClass();
|
7319
7318
|
* </script>
|
7320
7319
|
* ```
|
@@ -7848,7 +7847,7 @@ var attachedInternalSymbol = Symbol('attachedInternal');
|
|
7848
7847
|
*
|
7849
7848
|
* ```
|
7850
7849
|
* <script type="module">
|
7851
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7850
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
7852
7851
|
* document.createElement('monster-')
|
7853
7852
|
* </script>
|
7854
7853
|
* ```
|
@@ -8222,7 +8221,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
8222
8221
|
/* harmony export */ "initMethodSymbol": function() { return /* binding */ initMethodSymbol; },
|
8223
8222
|
/* harmony export */ "assembleMethodSymbol": function() { return /* binding */ assembleMethodSymbol; },
|
8224
8223
|
/* harmony export */ "assignUpdaterToElement": function() { return /* binding */ assignUpdaterToElement; },
|
8225
|
-
/* harmony export */ "attributeObserverSymbol": function() { return /* binding */ attributeObserverSymbol; }
|
8224
|
+
/* harmony export */ "attributeObserverSymbol": function() { return /* binding */ attributeObserverSymbol; },
|
8225
|
+
/* harmony export */ "getSlottedElements": function() { return /* binding */ getSlottedElements; }
|
8226
8226
|
/* harmony export */ });
|
8227
8227
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
8228
8228
|
/* harmony import */ var _data_extend_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
|
@@ -8383,7 +8383,7 @@ var attributeObserverSymbol = Symbol('attributeObserver');
|
|
8383
8383
|
*
|
8384
8384
|
* ```
|
8385
8385
|
* <script type="module">
|
8386
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
8386
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
8387
8387
|
* document.createElement('monster-')
|
8388
8388
|
* </script>
|
8389
8389
|
* ```
|
@@ -8693,7 +8693,9 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8693
8693
|
|
8694
8694
|
try {
|
8695
8695
|
initCSSStylesheet.call(this);
|
8696
|
-
} catch (e) {
|
8696
|
+
} catch (e) {
|
8697
|
+
(0,_attributes_js__WEBPACK_IMPORTED_MODULE_11__.addAttributeToken)(self, _constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_ERRORMESSAGE, e.toString());
|
8698
|
+
}
|
8697
8699
|
}
|
8698
8700
|
|
8699
8701
|
if (!(elements instanceof NodeList)) {
|
@@ -8840,14 +8842,16 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8840
8842
|
}( /*#__PURE__*/_wrapNativeSuper(HTMLElement));
|
8841
8843
|
/**
|
8842
8844
|
* @private
|
8843
|
-
* @param {String}
|
8845
|
+
* @param {String|undefined} query
|
8846
|
+
* @param {String|undefined|null} name name of the slot (if the parameter is undefined, all slots are searched, if the parameter has the value null, all slots without a name are searched. if a string is specified, the slots with this name are searched.)
|
8844
8847
|
* @return {*}
|
8845
8848
|
* @this CustomElement
|
8846
8849
|
* @since 1.23.0
|
8850
|
+
* @throws {Error} query must be a string
|
8847
8851
|
*/
|
8848
8852
|
|
8849
8853
|
|
8850
|
-
function getSlottedElements(
|
8854
|
+
function getSlottedElements(query, name) {
|
8851
8855
|
var self = this;
|
8852
8856
|
var result = new Set();
|
8853
8857
|
|
@@ -8855,7 +8859,17 @@ function getSlottedElements(filter) {
|
|
8855
8859
|
return result;
|
8856
8860
|
}
|
8857
8861
|
|
8858
|
-
var
|
8862
|
+
var selector = 'slot';
|
8863
|
+
|
8864
|
+
if (name !== undefined) {
|
8865
|
+
if (name === null) {
|
8866
|
+
selector += ':not([name])';
|
8867
|
+
} else {
|
8868
|
+
selector += '[name=' + (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_9__.validateString)(name) + ']';
|
8869
|
+
}
|
8870
|
+
}
|
8871
|
+
|
8872
|
+
var slots = self.shadowRoot.querySelectorAll(selector);
|
8859
8873
|
|
8860
8874
|
for (var _i = 0, _Object$entries = Object.entries(slots); _i < _Object$entries.length; _i++) {
|
8861
8875
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
@@ -8864,14 +8878,16 @@ function getSlottedElements(filter) {
|
|
8864
8878
|
slot.assignedElements().forEach(function (node) {
|
8865
8879
|
if (!(node instanceof HTMLElement)) return;
|
8866
8880
|
|
8867
|
-
if (
|
8868
|
-
node.querySelectorAll(
|
8881
|
+
if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isString)(query)) {
|
8882
|
+
node.querySelectorAll(query).forEach(function (n) {
|
8869
8883
|
result.add(n);
|
8870
8884
|
});
|
8871
8885
|
|
8872
|
-
if (node.matches(
|
8886
|
+
if (node.matches(query)) {
|
8873
8887
|
result.add(node);
|
8874
8888
|
}
|
8889
|
+
} else if (query !== undefined) {
|
8890
|
+
throw new Error('query must be a string');
|
8875
8891
|
} else {
|
8876
8892
|
result.add(node);
|
8877
8893
|
}
|
@@ -8989,7 +9005,7 @@ function initOptionObserver() {
|
|
8989
9005
|
}
|
8990
9006
|
})); // disabled
|
8991
9007
|
|
8992
|
-
self[attributeObserverSymbol][_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED] = function (
|
9008
|
+
self[attributeObserverSymbol][_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED] = function () {
|
8993
9009
|
if (self.hasAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED)) {
|
8994
9010
|
self.setOption(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED, true);
|
8995
9011
|
} else {
|
@@ -9076,6 +9092,7 @@ function initHtmlContent() {
|
|
9076
9092
|
* @memberOf Monster.DOM
|
9077
9093
|
* @this CustomElement
|
9078
9094
|
* @since 1.16.0
|
9095
|
+
* @throws {TypeError} value is not an instance of
|
9079
9096
|
*/
|
9080
9097
|
|
9081
9098
|
|
@@ -9089,13 +9106,55 @@ function initCSSStylesheet() {
|
|
9089
9106
|
var styleSheet = this.constructor.getCSSStyleSheet();
|
9090
9107
|
|
9091
9108
|
if (styleSheet instanceof CSSStyleSheet) {
|
9092
|
-
|
9109
|
+
if (styleSheet.cssRules.length > 0) {
|
9110
|
+
this.shadowRoot.adoptedStyleSheets = [styleSheet];
|
9111
|
+
}
|
9093
9112
|
} else if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isArray)(styleSheet)) {
|
9094
|
-
|
9113
|
+
var assign = [];
|
9114
|
+
|
9115
|
+
var _iterator3 = _createForOfIteratorHelper(styleSheet),
|
9116
|
+
_step3;
|
9117
|
+
|
9118
|
+
try {
|
9119
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
9120
|
+
var s = _step3.value;
|
9121
|
+
|
9122
|
+
if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isString)(s)) {
|
9123
|
+
var trimedStyleSheet = s.trim();
|
9124
|
+
|
9125
|
+
if (trimedStyleSheet !== '') {
|
9126
|
+
var style = document.createElement('style');
|
9127
|
+
style.innerHTML = trimedStyleSheet;
|
9128
|
+
self.shadowRoot.prepend(style);
|
9129
|
+
}
|
9130
|
+
|
9131
|
+
continue;
|
9132
|
+
}
|
9133
|
+
|
9134
|
+
(0,_types_validate_js__WEBPACK_IMPORTED_MODULE_9__.validateInstance)(s, CSSStyleSheet);
|
9135
|
+
|
9136
|
+
if (s.cssRules.length > 0) {
|
9137
|
+
assign.push(s);
|
9138
|
+
}
|
9139
|
+
}
|
9140
|
+
} catch (err) {
|
9141
|
+
_iterator3.e(err);
|
9142
|
+
} finally {
|
9143
|
+
_iterator3.f();
|
9144
|
+
}
|
9145
|
+
|
9146
|
+
if (assign.length > 0) {
|
9147
|
+
this.shadowRoot.adoptedStyleSheets = assign;
|
9148
|
+
}
|
9095
9149
|
} else if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isString)(styleSheet)) {
|
9096
|
-
var
|
9097
|
-
|
9098
|
-
|
9150
|
+
var _trimedStyleSheet = styleSheet.trim();
|
9151
|
+
|
9152
|
+
if (_trimedStyleSheet !== '') {
|
9153
|
+
var _style = document.createElement('style');
|
9154
|
+
|
9155
|
+
_style.innerHTML = styleSheet;
|
9156
|
+
self.shadowRoot.prepend(_style);
|
9157
|
+
}
|
9099
9158
|
}
|
9100
9159
|
|
9101
9160
|
return self;
|
@@ -9249,7 +9308,7 @@ var internal = Symbol('internal');
|
|
9249
9308
|
*
|
9250
9309
|
* ```
|
9251
9310
|
* <script type="module">
|
9252
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9311
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
9253
9312
|
* new Monster.Types.DataUrl()
|
9254
9313
|
* </script>
|
9255
9314
|
* ```
|
@@ -9258,7 +9317,7 @@ var internal = Symbol('internal');
|
|
9258
9317
|
*
|
9259
9318
|
* ```
|
9260
9319
|
* <script type="module">
|
9261
|
-
* import {DataUrl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9320
|
+
* import {DataUrl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/dataurl.js';
|
9262
9321
|
* new DataUrl()
|
9263
9322
|
* </script>
|
9264
9323
|
* ```
|
@@ -9338,7 +9397,7 @@ var DataUrl = /*#__PURE__*/function (_Base) {
|
|
9338
9397
|
*
|
9339
9398
|
* ```
|
9340
9399
|
* <script type="module">
|
9341
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9400
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
9342
9401
|
* console.log(Monster.Types.parseDataURL())
|
9343
9402
|
* </script>
|
9344
9403
|
* ```
|
@@ -9347,7 +9406,7 @@ var DataUrl = /*#__PURE__*/function (_Base) {
|
|
9347
9406
|
*
|
9348
9407
|
* ```
|
9349
9408
|
* <script type="module">
|
9350
|
-
* import {parseDataURL} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9409
|
+
* import {parseDataURL} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/dataurl.js';
|
9351
9410
|
* console.log(parseDataURL())
|
9352
9411
|
* </script>
|
9353
9412
|
* ```
|
@@ -9485,7 +9544,7 @@ var internal = Symbol('internal');
|
|
9485
9544
|
*
|
9486
9545
|
* ```
|
9487
9546
|
* <script type="module">
|
9488
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9547
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
9489
9548
|
* console.log(new Monster.Types.MediaType())
|
9490
9549
|
* </script>
|
9491
9550
|
* ```
|
@@ -9494,7 +9553,7 @@ var internal = Symbol('internal');
|
|
9494
9553
|
*
|
9495
9554
|
* ```
|
9496
9555
|
* <script type="module">
|
9497
|
-
* import {MediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9556
|
+
* import {MediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/mediatype.js';
|
9498
9557
|
* console.log(new MediaType())
|
9499
9558
|
* </script>
|
9500
9559
|
* ```
|
@@ -9612,7 +9671,7 @@ var MediaType = /*#__PURE__*/function (_Base) {
|
|
9612
9671
|
*
|
9613
9672
|
* ```
|
9614
9673
|
* <script type="module">
|
9615
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9674
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
9616
9675
|
* console.log(Monster.Types.parseMediaType())
|
9617
9676
|
* </script>
|
9618
9677
|
* ```
|
@@ -9621,7 +9680,7 @@ var MediaType = /*#__PURE__*/function (_Base) {
|
|
9621
9680
|
*
|
9622
9681
|
* ```
|
9623
9682
|
* <script type="module">
|
9624
|
-
* import {parseMediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9683
|
+
* import {parseMediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/dataurl.js';
|
9625
9684
|
* console.log(parseMediaType())
|
9626
9685
|
* </script>
|
9627
9686
|
* ```
|
@@ -9760,7 +9819,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
9760
9819
|
*
|
9761
9820
|
* ```
|
9762
9821
|
* <script type="module">
|
9763
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9822
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
9764
9823
|
* new Monster.DOM.Template()
|
9765
9824
|
* </script>
|
9766
9825
|
* ```
|
@@ -9769,7 +9828,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
9769
9828
|
*
|
9770
9829
|
* ```
|
9771
9830
|
* <script type="module">
|
9772
|
-
* import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9831
|
+
* import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/template.js';
|
9773
9832
|
* new Template()
|
9774
9833
|
* </script>
|
9775
9834
|
* ```
|
@@ -9847,7 +9906,7 @@ var Template = /*#__PURE__*/function (_Base) {
|
|
9847
9906
|
*
|
9848
9907
|
* ```
|
9849
9908
|
* <script type="module">
|
9850
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9909
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
9851
9910
|
* Monster.DOM.findDocumentTemplate()
|
9852
9911
|
* </script>
|
9853
9912
|
* ```
|
@@ -9856,14 +9915,14 @@ var Template = /*#__PURE__*/function (_Base) {
|
|
9856
9915
|
*
|
9857
9916
|
* ```
|
9858
9917
|
* <script type="module">
|
9859
|
-
* import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9918
|
+
* import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/template.js';
|
9860
9919
|
* findDocumentTemplate()
|
9861
9920
|
* </script>
|
9862
9921
|
* ```
|
9863
9922
|
*
|
9864
9923
|
* @example
|
9865
9924
|
*
|
9866
|
-
* import { findDocumentTemplate } from "https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9925
|
+
* import { findDocumentTemplate } from "https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/template.js";
|
9867
9926
|
*
|
9868
9927
|
* const template = document.createElement("template");
|
9869
9928
|
* template.id = "myTemplate";
|
@@ -10035,7 +10094,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
10035
10094
|
*
|
10036
10095
|
* ```
|
10037
10096
|
* <script type="module">
|
10038
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10097
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
10039
10098
|
* console.log(new Monster.DOM.Theme())
|
10040
10099
|
* </script>
|
10041
10100
|
* ```
|
@@ -10044,14 +10103,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
10044
10103
|
*
|
10045
10104
|
* ```
|
10046
10105
|
* <script type="module">
|
10047
|
-
* import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10106
|
+
* import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/theme.js';
|
10048
10107
|
* console.log(new Theme())
|
10049
10108
|
* </script>
|
10050
10109
|
* ```
|
10051
10110
|
*
|
10052
10111
|
* @example
|
10053
10112
|
*
|
10054
|
-
* import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10113
|
+
* import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/theme.js';
|
10055
10114
|
*
|
10056
10115
|
* const theme = getDocumentTheme();
|
10057
10116
|
* console.log(theme.getName());
|
@@ -10238,7 +10297,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
10238
10297
|
*
|
10239
10298
|
* ```
|
10240
10299
|
* <script type="module">
|
10241
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10300
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
10242
10301
|
* new Monster.DOM.Updater()
|
10243
10302
|
* </script>
|
10244
10303
|
* ```
|
@@ -10247,14 +10306,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
10247
10306
|
*
|
10248
10307
|
* ```
|
10249
10308
|
* <script type="module">
|
10250
|
-
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10309
|
+
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/updater.js';
|
10251
10310
|
* new Updater()
|
10252
10311
|
* </script>
|
10253
10312
|
* ```
|
10254
10313
|
*
|
10255
10314
|
* @example
|
10256
10315
|
*
|
10257
|
-
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10316
|
+
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/updater.js';
|
10258
10317
|
*
|
10259
10318
|
* // First we prepare the html document.
|
10260
10319
|
* // This is done here via script, but can also be inserted into the document as pure html.
|
@@ -10569,6 +10628,8 @@ function getControlEventHandler() {
|
|
10569
10628
|
* @throws {Error} the bind argument must start as a value with a path
|
10570
10629
|
* @param {HTMLElement} element
|
10571
10630
|
* @return void
|
10631
|
+
* @memberOf Monster.DOM
|
10632
|
+
* @private
|
10572
10633
|
*/
|
10573
10634
|
|
10574
10635
|
|
@@ -10633,6 +10694,7 @@ function retrieveAndSetValue(element) {
|
|
10633
10694
|
/**
|
10634
10695
|
* @since 1.27.0
|
10635
10696
|
* @return void
|
10697
|
+
* @private
|
10636
10698
|
*/
|
10637
10699
|
|
10638
10700
|
|
@@ -10700,25 +10762,34 @@ function removeElement(change) {
|
|
10700
10762
|
|
10701
10763
|
|
10702
10764
|
function insertElement(change) {
|
10703
|
-
var _this2 = this;
|
10704
|
-
|
10705
10765
|
var self = this;
|
10706
10766
|
var subject = self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getRealSubject();
|
10707
10767
|
var document = (0,_util_js__WEBPACK_IMPORTED_MODULE_15__.getDocument)();
|
10708
10768
|
var mem = new WeakSet();
|
10709
10769
|
var wd = 0;
|
10770
|
+
var container = self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element;
|
10710
10771
|
|
10711
10772
|
while (true) {
|
10712
10773
|
var found = false;
|
10713
10774
|
wd++;
|
10714
10775
|
var p = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(change === null || change === void 0 ? void 0 : change['path']);
|
10715
|
-
if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(p)) return
|
10776
|
+
if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(p)) return self;
|
10716
10777
|
|
10717
10778
|
while (p.length > 0) {
|
10718
10779
|
var current = p.join('.');
|
10719
|
-
var
|
10780
|
+
var iterator = new Set();
|
10781
|
+
var query = '[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT + '*="path:' + current + '"]';
|
10782
|
+
var e = container.querySelectorAll(query);
|
10783
|
+
|
10784
|
+
if (e.length > 0) {
|
10785
|
+
iterator = new Set(_toConsumableArray(e));
|
10786
|
+
}
|
10787
|
+
|
10788
|
+
if (container.matches(query)) {
|
10789
|
+
iterator.add(container);
|
10790
|
+
}
|
10720
10791
|
|
10721
|
-
var _iterator5 = _createForOfIteratorHelper(
|
10792
|
+
var _iterator5 = _createForOfIteratorHelper(iterator.entries()),
|
10722
10793
|
_step5;
|
10723
10794
|
|
10724
10795
|
try {
|
@@ -10741,11 +10812,9 @@ function insertElement(change) {
|
|
10741
10812
|
}
|
10742
10813
|
|
10743
10814
|
var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__.Pipe(cmd);
|
10744
|
-
|
10745
|
-
_this2[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
|
10815
|
+
self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
|
10746
10816
|
pipe.setCallback(n, f);
|
10747
10817
|
});
|
10748
|
-
|
10749
10818
|
var value = void 0;
|
10750
10819
|
|
10751
10820
|
try {
|
@@ -10793,7 +10862,11 @@ function insertElement(change) {
|
|
10793
10862
|
node = _Object$entries3$_i[1];
|
10794
10863
|
|
10795
10864
|
if (!available.has(node.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT_REFERENCE))) {
|
10796
|
-
|
10865
|
+
try {
|
10866
|
+
containerElement.removeChild(node);
|
10867
|
+
} catch (e) {
|
10868
|
+
containerElement.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, (containerElement.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE) + ", " + e.message).trim());
|
10869
|
+
}
|
10797
10870
|
}
|
10798
10871
|
}
|
10799
10872
|
};
|
@@ -10919,7 +10992,7 @@ function updateContent(change) {
|
|
10919
10992
|
|
10920
10993
|
|
10921
10994
|
function runUpdateContent(container, parts, subject) {
|
10922
|
-
var
|
10995
|
+
var _this2 = this;
|
10923
10996
|
|
10924
10997
|
if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(parts)) return;
|
10925
10998
|
if (!(container instanceof HTMLElement)) return;
|
@@ -10937,37 +11010,65 @@ function runUpdateContent(container, parts, subject) {
|
|
10937
11010
|
if (container.matches(query)) {
|
10938
11011
|
iterator.add(container);
|
10939
11012
|
}
|
11013
|
+
/**
|
11014
|
+
* @type {HTMLElement} element
|
11015
|
+
*/
|
10940
11016
|
|
10941
|
-
iterator.forEach(function (key, element) {
|
10942
|
-
if (mem.has(element)) return;
|
10943
|
-
mem.add(element);
|
10944
|
-
var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE);
|
10945
|
-
var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(attributes);
|
10946
|
-
var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__.Pipe(cmd);
|
10947
11017
|
|
10948
|
-
|
10949
|
-
|
10950
|
-
});
|
11018
|
+
var _iterator6 = _createForOfIteratorHelper(iterator.entries()),
|
11019
|
+
_step6;
|
10951
11020
|
|
10952
|
-
|
11021
|
+
try {
|
11022
|
+
var _loop2 = function _loop2() {
|
11023
|
+
var _step6$value = _slicedToArray(_step6.value, 1),
|
11024
|
+
element = _step6$value[0];
|
10953
11025
|
|
10954
|
-
|
10955
|
-
|
10956
|
-
|
10957
|
-
|
10958
|
-
element.
|
10959
|
-
|
11026
|
+
if (mem.has(element)) return {
|
11027
|
+
v: void 0
|
11028
|
+
};
|
11029
|
+
mem.add(element);
|
11030
|
+
var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE);
|
11031
|
+
var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(attributes);
|
11032
|
+
var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__.Pipe(cmd);
|
11033
|
+
|
11034
|
+
_this2[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
|
11035
|
+
pipe.setCallback(n, f);
|
11036
|
+
});
|
11037
|
+
|
11038
|
+
var value = void 0;
|
10960
11039
|
|
10961
|
-
|
10962
|
-
|
10963
|
-
|
11040
|
+
try {
|
11041
|
+
element.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE);
|
11042
|
+
value = pipe.run(subject);
|
11043
|
+
} catch (e) {
|
11044
|
+
element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, e.message);
|
10964
11045
|
}
|
10965
11046
|
|
10966
|
-
|
10967
|
-
|
10968
|
-
|
11047
|
+
if (value instanceof HTMLElement) {
|
11048
|
+
while (element.firstChild) {
|
11049
|
+
element.removeChild(element.firstChild);
|
11050
|
+
}
|
11051
|
+
|
11052
|
+
try {
|
11053
|
+
element.appendChild(value);
|
11054
|
+
} catch (e) {
|
11055
|
+
element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, (element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE) + ", " + e.message).trim());
|
11056
|
+
}
|
11057
|
+
} else {
|
11058
|
+
element.innerHTML = value;
|
11059
|
+
}
|
11060
|
+
};
|
11061
|
+
|
11062
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
11063
|
+
var _ret2 = _loop2();
|
11064
|
+
|
11065
|
+
if (_typeof(_ret2) === "object") return _ret2.v;
|
10969
11066
|
}
|
10970
|
-
})
|
11067
|
+
} catch (err) {
|
11068
|
+
_iterator6.e(err);
|
11069
|
+
} finally {
|
11070
|
+
_iterator6.f();
|
11071
|
+
}
|
10971
11072
|
}
|
10972
11073
|
}
|
10973
11074
|
/**
|
@@ -10995,7 +11096,7 @@ function updateAttributes(change) {
|
|
10995
11096
|
|
10996
11097
|
|
10997
11098
|
function runUpdateAttributes(container, parts, subject) {
|
10998
|
-
var
|
11099
|
+
var _this3 = this;
|
10999
11100
|
|
11000
11101
|
var self = this;
|
11001
11102
|
if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(parts)) return;
|
@@ -11017,45 +11118,65 @@ function runUpdateAttributes(container, parts, subject) {
|
|
11017
11118
|
iterator.add(container);
|
11018
11119
|
}
|
11019
11120
|
|
11020
|
-
iterator.
|
11021
|
-
|
11022
|
-
mem.add(element);
|
11023
|
-
var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES);
|
11121
|
+
var _iterator7 = _createForOfIteratorHelper(iterator.entries()),
|
11122
|
+
_step7;
|
11024
11123
|
|
11025
|
-
|
11026
|
-
|
11027
|
-
|
11124
|
+
try {
|
11125
|
+
var _loop3 = function _loop3() {
|
11126
|
+
var _step7$value = _slicedToArray(_step7.value, 1),
|
11127
|
+
element = _step7$value[0];
|
11028
11128
|
|
11029
|
-
|
11030
|
-
|
11031
|
-
|
11032
|
-
|
11033
|
-
var
|
11034
|
-
self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
|
11035
|
-
pipe.setCallback(n, f, element);
|
11036
|
-
});
|
11037
|
-
var value = void 0;
|
11129
|
+
if (mem.has(element)) return {
|
11130
|
+
v: void 0
|
11131
|
+
};
|
11132
|
+
mem.add(element);
|
11133
|
+
var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES);
|
11038
11134
|
|
11039
|
-
|
11040
|
-
|
11041
|
-
|
11042
|
-
} catch (e) {
|
11043
|
-
element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, e.message);
|
11044
|
-
}
|
11135
|
+
var _loop4 = function _loop4() {
|
11136
|
+
var _Object$entries8$_i = _slicedToArray(_Object$entries8[_i9], 2),
|
11137
|
+
def = _Object$entries8$_i[1];
|
11045
11138
|
|
11046
|
-
|
11047
|
-
|
11048
|
-
|
11049
|
-
|
11050
|
-
|
11139
|
+
def = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def);
|
11140
|
+
var i = def.indexOf(' ');
|
11141
|
+
var name = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def.substr(0, i));
|
11142
|
+
var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def.substr(i));
|
11143
|
+
var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__.Pipe(cmd);
|
11144
|
+
self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
|
11145
|
+
pipe.setCallback(n, f, element);
|
11146
|
+
});
|
11147
|
+
var value = void 0;
|
11148
|
+
|
11149
|
+
try {
|
11150
|
+
element.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE);
|
11151
|
+
value = pipe.run(subject);
|
11152
|
+
} catch (e) {
|
11153
|
+
element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, e.message);
|
11154
|
+
}
|
11051
11155
|
|
11052
|
-
|
11156
|
+
if (value === undefined) {
|
11157
|
+
element.removeAttribute(name);
|
11158
|
+
} else if (element.getAttribute(name) !== value) {
|
11159
|
+
element.setAttribute(name, value);
|
11160
|
+
}
|
11161
|
+
|
11162
|
+
handleInputControlAttributeUpdate.call(_this3, element, name, value);
|
11163
|
+
};
|
11164
|
+
|
11165
|
+
for (var _i9 = 0, _Object$entries8 = Object.entries(attributes.split(',')); _i9 < _Object$entries8.length; _i9++) {
|
11166
|
+
_loop4();
|
11167
|
+
}
|
11053
11168
|
};
|
11054
11169
|
|
11055
|
-
for (
|
11056
|
-
|
11170
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
11171
|
+
var _ret3 = _loop3();
|
11172
|
+
|
11173
|
+
if (_typeof(_ret3) === "object") return _ret3.v;
|
11057
11174
|
}
|
11058
|
-
})
|
11175
|
+
} catch (err) {
|
11176
|
+
_iterator7.e(err);
|
11177
|
+
} finally {
|
11178
|
+
_iterator7.f();
|
11179
|
+
}
|
11059
11180
|
}
|
11060
11181
|
}
|
11061
11182
|
/**
|
@@ -11188,7 +11309,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
11188
11309
|
*
|
11189
11310
|
* ```
|
11190
11311
|
* <script type="module">
|
11191
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11312
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
11192
11313
|
* Monster.Util.trimSpaces(" hello ")
|
11193
11314
|
* </script>
|
11194
11315
|
* ```
|
@@ -11197,7 +11318,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
11197
11318
|
*
|
11198
11319
|
* ```
|
11199
11320
|
* <script type="module">
|
11200
|
-
* import {trimSpaces} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11321
|
+
* import {trimSpaces} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/util/trimspaces.js';
|
11201
11322
|
* trimSpaces(' hello \\ ')
|
11202
11323
|
* </script>
|
11203
11324
|
* ```
|
@@ -11302,7 +11423,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
11302
11423
|
*
|
11303
11424
|
* ```
|
11304
11425
|
* <script type="module">
|
11305
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11426
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
11306
11427
|
* new Monster.DOM.fireEvent()
|
11307
11428
|
* </script>
|
11308
11429
|
* ```
|
@@ -11311,7 +11432,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
11311
11432
|
*
|
11312
11433
|
* ```
|
11313
11434
|
* <script type="module">
|
11314
|
-
* import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11435
|
+
* import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/events.js';
|
11315
11436
|
* fireEvent()
|
11316
11437
|
* </script>
|
11317
11438
|
* ```
|
@@ -11363,7 +11484,7 @@ function fireEvent(element, type) {
|
|
11363
11484
|
*
|
11364
11485
|
* ```
|
11365
11486
|
* <script type="module">
|
11366
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11487
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
11367
11488
|
* new Monster.DOM.fireCustomEvent()
|
11368
11489
|
* </script>
|
11369
11490
|
* ```
|
@@ -11372,7 +11493,7 @@ function fireEvent(element, type) {
|
|
11372
11493
|
*
|
11373
11494
|
* ```
|
11374
11495
|
* <script type="module">
|
11375
|
-
* import {fireCustomEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11496
|
+
* import {fireCustomEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/events.js';
|
11376
11497
|
* fireCustomEvent()
|
11377
11498
|
* </script>
|
11378
11499
|
* ```
|
@@ -11380,7 +11501,7 @@ function fireEvent(element, type) {
|
|
11380
11501
|
* @param {HTMLElement|HTMLCollection|NodeList} element
|
11381
11502
|
* @param {string} type
|
11382
11503
|
* @return {void}
|
11383
|
-
* @since 1.
|
11504
|
+
* @since 1.29.0
|
11384
11505
|
* @copyright schukai GmbH
|
11385
11506
|
* @memberOf Monster.DOM
|
11386
11507
|
* @throws {TypeError} value is not an instance of HTMLElement or HTMLCollection
|
@@ -11431,7 +11552,7 @@ function fireCustomEvent(element, type, detail) {
|
|
11431
11552
|
*
|
11432
11553
|
* ```
|
11433
11554
|
* <script type="module">
|
11434
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11555
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
11435
11556
|
* new Monster.DOM.findTargetElementFromEvent()
|
11436
11557
|
* </script>
|
11437
11558
|
* ```
|
@@ -11440,7 +11561,7 @@ function fireCustomEvent(element, type, detail) {
|
|
11440
11561
|
*
|
11441
11562
|
* ```
|
11442
11563
|
* <script type="module">
|
11443
|
-
* import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11564
|
+
* import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/events.js';
|
11444
11565
|
* findTargetElementFromEvent()
|
11445
11566
|
* </script>
|
11446
11567
|
* ```
|
@@ -11511,7 +11632,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
11511
11632
|
*
|
11512
11633
|
* ```
|
11513
11634
|
* <script type="module">
|
11514
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11635
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
11515
11636
|
* console.log(Monster.DOM.getDocument())
|
11516
11637
|
* </script>
|
11517
11638
|
* ```
|
@@ -11520,7 +11641,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
11520
11641
|
*
|
11521
11642
|
* ```
|
11522
11643
|
* <script type="module">
|
11523
|
-
* import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11644
|
+
* import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/util.js';
|
11524
11645
|
* console.log(getDocument())
|
11525
11646
|
* </script>
|
11526
11647
|
* ```
|
@@ -11575,7 +11696,7 @@ function getDocument() {
|
|
11575
11696
|
*
|
11576
11697
|
* ```
|
11577
11698
|
* <script type="module">
|
11578
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11699
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
11579
11700
|
* console.log(Monster.DOM.getWindow())
|
11580
11701
|
* </script>
|
11581
11702
|
* ```
|
@@ -11584,7 +11705,7 @@ function getDocument() {
|
|
11584
11705
|
*
|
11585
11706
|
* ```
|
11586
11707
|
* <script type="module">
|
11587
|
-
* import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11708
|
+
* import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/util.js';
|
11588
11709
|
* console.log(getWindow(null))
|
11589
11710
|
* </script>
|
11590
11711
|
* ```
|
@@ -11644,7 +11765,7 @@ function getWindow() {
|
|
11644
11765
|
*
|
11645
11766
|
* ```
|
11646
11767
|
* <script type="module">
|
11647
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11768
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
11648
11769
|
* console.log(Monster.DOM.getDocumentFragmentFromString())
|
11649
11770
|
* </script>
|
11650
11771
|
* ```
|
@@ -11653,7 +11774,7 @@ function getWindow() {
|
|
11653
11774
|
*
|
11654
11775
|
* ```
|
11655
11776
|
* <script type="module">
|
11656
|
-
* import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11777
|
+
* import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/util.js';
|
11657
11778
|
* console.log(getDocumentFragmentFromString('<div></div>'))
|
11658
11779
|
* </script>
|
11659
11780
|
* ```
|
@@ -11743,7 +11864,7 @@ var DEFAULT_LANGUAGE = 'en';
|
|
11743
11864
|
*
|
11744
11865
|
* ```
|
11745
11866
|
* <script type="module">
|
11746
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11867
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
11747
11868
|
* new Monster.DOM.getLocaleOfDocument()
|
11748
11869
|
* </script>
|
11749
11870
|
* ```
|
@@ -11752,7 +11873,7 @@ var DEFAULT_LANGUAGE = 'en';
|
|
11752
11873
|
*
|
11753
11874
|
* ```
|
11754
11875
|
* <script type="module">
|
11755
|
-
* import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11876
|
+
* import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/dom/locale.js';
|
11756
11877
|
* new getLocaleOfDocument()
|
11757
11878
|
* </script>
|
11758
11879
|
* ```
|
@@ -11845,7 +11966,7 @@ var localeStringSymbol = Symbol('localeString');
|
|
11845
11966
|
*
|
11846
11967
|
* ```
|
11847
11968
|
* <script type="module">
|
11848
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11969
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
11849
11970
|
* new Monster.I18n.Locale()
|
11850
11971
|
* </script>
|
11851
11972
|
* ```
|
@@ -11854,7 +11975,7 @@ var localeStringSymbol = Symbol('localeString');
|
|
11854
11975
|
*
|
11855
11976
|
* ```
|
11856
11977
|
* <script type="module">
|
11857
|
-
* import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11978
|
+
* import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/i18n/locale.js';
|
11858
11979
|
* new Locale()
|
11859
11980
|
* </script>
|
11860
11981
|
* ```
|
@@ -12047,7 +12168,7 @@ var Locale = /*#__PURE__*/function (_Base) {
|
|
12047
12168
|
*
|
12048
12169
|
* ```
|
12049
12170
|
* <script type="module">
|
12050
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12171
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
12051
12172
|
* new Monster.I18n.createLocale()
|
12052
12173
|
* </script>
|
12053
12174
|
* ```
|
@@ -12056,7 +12177,7 @@ var Locale = /*#__PURE__*/function (_Base) {
|
|
12056
12177
|
*
|
12057
12178
|
* ```
|
12058
12179
|
* <script type="module">
|
12059
|
-
* import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12180
|
+
* import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/i18n/locale.js';
|
12060
12181
|
* createLocale()
|
12061
12182
|
* </script>
|
12062
12183
|
* ```
|
@@ -12232,7 +12353,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12232
12353
|
*
|
12233
12354
|
* ```
|
12234
12355
|
* <script type="module">
|
12235
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12356
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
12236
12357
|
* new Monster.I18n.Provider()
|
12237
12358
|
* </script>
|
12238
12359
|
* ```
|
@@ -12241,7 +12362,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12241
12362
|
*
|
12242
12363
|
* ```
|
12243
12364
|
* <script type="module">
|
12244
|
-
* import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12365
|
+
* import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/i18n/provider.js';
|
12245
12366
|
* new Provider()
|
12246
12367
|
* </script>
|
12247
12368
|
* ```
|
@@ -12338,24 +12459,39 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12338
12459
|
/**
|
12339
12460
|
* This is the base class with options from which some monster classes are derived.
|
12340
12461
|
*
|
12341
|
-
*
|
12462
|
+
* This class is actually only used as a base class.
|
12463
|
+
*
|
12464
|
+
* However, you can also create an instance directly via the monster namespace `new Monster.Types.BaseWithOptions()`.
|
12342
12465
|
*
|
12343
|
-
* ```
|
12466
|
+
* ```html
|
12344
12467
|
* <script type="module">
|
12345
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12468
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
12346
12469
|
* new Monster.Types.BaseWithOptions()
|
12347
12470
|
* </script>
|
12348
12471
|
* ```
|
12349
12472
|
*
|
12350
12473
|
* Alternatively, you can also integrate this function individually.
|
12351
12474
|
*
|
12352
|
-
* ```
|
12475
|
+
* ```html
|
12353
12476
|
* <script type="module">
|
12354
|
-
* import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12477
|
+
* import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/basewithoptions.js';
|
12355
12478
|
* new BaseWithOptions()
|
12356
12479
|
* </script>
|
12357
12480
|
* ```
|
12481
|
+
*
|
12482
|
+
* Classes that require the possibility of options can be derived directly from this class.
|
12483
|
+
* Derived classes almost always override the `defaul` getter with their own values.
|
12358
12484
|
*
|
12485
|
+
* ```javascript
|
12486
|
+
* class My extends BaseWithOptions {
|
12487
|
+
* get defaults() {
|
12488
|
+
* return Object.assign({}, super.defaults, {
|
12489
|
+
* mykey: true
|
12490
|
+
* });
|
12491
|
+
* }
|
12492
|
+
* }
|
12493
|
+
* ```
|
12494
|
+
*
|
12359
12495
|
* The class was formerly called Object.
|
12360
12496
|
*
|
12361
12497
|
* @since 1.13.0
|
@@ -12387,7 +12523,18 @@ var BaseWithOptions = /*#__PURE__*/function (_Base) {
|
|
12387
12523
|
return _this;
|
12388
12524
|
}
|
12389
12525
|
/**
|
12390
|
-
*
|
12526
|
+
* This getter provides the options. Derived classes overwrite
|
12527
|
+
* this getter with their own values. It is good karma to always include
|
12528
|
+
* the values from the parent class.
|
12529
|
+
*
|
12530
|
+
* ```javascript
|
12531
|
+
* get defaults() {
|
12532
|
+
* return Object.assign({}, super.defaults, {
|
12533
|
+
* mykey: true
|
12534
|
+
* });
|
12535
|
+
* }
|
12536
|
+
*
|
12537
|
+
* ```
|
12391
12538
|
*
|
12392
12539
|
* @return {object}
|
12393
12540
|
*/
|
@@ -12492,7 +12639,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12492
12639
|
*
|
12493
12640
|
* ```
|
12494
12641
|
* <script type="module">
|
12495
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12642
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
12496
12643
|
* new Monster.I18n.Translations()
|
12497
12644
|
* </script>
|
12498
12645
|
* ```
|
@@ -12501,15 +12648,15 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12501
12648
|
*
|
12502
12649
|
* ```
|
12503
12650
|
* <script type="module">
|
12504
|
-
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12651
|
+
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/i18n/translations.js';
|
12505
12652
|
* new Translations()
|
12506
12653
|
* </script>
|
12507
12654
|
* ```
|
12508
12655
|
*
|
12509
12656
|
* @example
|
12510
12657
|
*
|
12511
|
-
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12512
|
-
* import {parseLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12658
|
+
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/i18n/translations.js';
|
12659
|
+
* import {parseLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/i18n/locale.js';
|
12513
12660
|
*
|
12514
12661
|
* const translation = new Translations(parseLocale('en-GB'));
|
12515
12662
|
*
|
@@ -12781,7 +12928,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12781
12928
|
*
|
12782
12929
|
* ```
|
12783
12930
|
* <script type="module">
|
12784
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12931
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
12785
12932
|
* new Monster.I18n.Providers.Fetch()
|
12786
12933
|
* </script>
|
12787
12934
|
* ```
|
@@ -12790,14 +12937,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12790
12937
|
*
|
12791
12938
|
* ```
|
12792
12939
|
* <script type="module">
|
12793
|
-
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12940
|
+
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/i18n/providers/fetch.js';
|
12794
12941
|
* new Fetch()
|
12795
12942
|
* </script>
|
12796
12943
|
* ```
|
12797
12944
|
*
|
12798
12945
|
* @example <caption>das ist ein test</caption>
|
12799
12946
|
*
|
12800
|
-
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12947
|
+
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/i18n/providers/fetch.js';
|
12801
12948
|
*
|
12802
12949
|
* // fetch from API
|
12803
12950
|
* const translation = new Fetch('https://example.com/${language}.json').getTranslation('en-GB');
|
@@ -13027,7 +13174,7 @@ var workingDataSymbol = Symbol('workingData');
|
|
13027
13174
|
*
|
13028
13175
|
* ```
|
13029
13176
|
* <script type="module">
|
13030
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13177
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
13031
13178
|
* new Monster.Text.Formatter()
|
13032
13179
|
* </script>
|
13033
13180
|
* ```
|
@@ -13036,7 +13183,7 @@ var workingDataSymbol = Symbol('workingData');
|
|
13036
13183
|
*
|
13037
13184
|
* ```
|
13038
13185
|
* <script type="module">
|
13039
|
-
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13186
|
+
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/text/formatter.js';
|
13040
13187
|
* new Formatter()
|
13041
13188
|
* </script>
|
13042
13189
|
* ```
|
@@ -13081,7 +13228,7 @@ var workingDataSymbol = Symbol('workingData');
|
|
13081
13228
|
*
|
13082
13229
|
* @example
|
13083
13230
|
*
|
13084
|
-
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13231
|
+
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/text/formatter.js';
|
13085
13232
|
*
|
13086
13233
|
* new Formatter({
|
13087
13234
|
* a: {
|
@@ -13426,7 +13573,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13426
13573
|
*
|
13427
13574
|
* ```
|
13428
13575
|
* <script type="module">
|
13429
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13576
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
13430
13577
|
* console.log(new Monster.Logging.Handler())
|
13431
13578
|
* </script>
|
13432
13579
|
* ```
|
@@ -13435,7 +13582,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13435
13582
|
*
|
13436
13583
|
* ```
|
13437
13584
|
* <script type="module">
|
13438
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13585
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/logging/handler.js';
|
13439
13586
|
* console.log(new Handler())
|
13440
13587
|
* </script>
|
13441
13588
|
* ```
|
@@ -13673,7 +13820,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13673
13820
|
*
|
13674
13821
|
* ```
|
13675
13822
|
* <script type="module">
|
13676
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13823
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
13677
13824
|
* console.log(new Monster.Logging.LogEntry())
|
13678
13825
|
* </script>
|
13679
13826
|
* ```
|
@@ -13682,7 +13829,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13682
13829
|
*
|
13683
13830
|
* ```
|
13684
13831
|
* <script type="module">
|
13685
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13832
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/logging/logentry.js';
|
13686
13833
|
* console.log(new LogEntry())
|
13687
13834
|
* </script>
|
13688
13835
|
* ```
|
@@ -13868,7 +14015,7 @@ var OFF = 0;
|
|
13868
14015
|
*
|
13869
14016
|
* ```
|
13870
14017
|
* <script type="module">
|
13871
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14018
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
13872
14019
|
* new Monster.Logging.Logger()
|
13873
14020
|
* </script>
|
13874
14021
|
* ```
|
@@ -13877,7 +14024,7 @@ var OFF = 0;
|
|
13877
14024
|
*
|
13878
14025
|
* ```
|
13879
14026
|
* <script type="module">
|
13880
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14027
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/logging/logger.js';
|
13881
14028
|
* new Logger()
|
13882
14029
|
* </script>
|
13883
14030
|
* ```
|
@@ -14177,7 +14324,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14177
14324
|
*
|
14178
14325
|
* ```
|
14179
14326
|
* <script type="module">
|
14180
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14327
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
14181
14328
|
* console.log(new Monster.Logging.Handler.ConsoleHandler())
|
14182
14329
|
* </script>
|
14183
14330
|
* ```
|
@@ -14186,7 +14333,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14186
14333
|
*
|
14187
14334
|
* ```
|
14188
14335
|
* <script type="module">
|
14189
|
-
* import {ConsoleHandler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14336
|
+
* import {ConsoleHandler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/logging/handler/console.js';
|
14190
14337
|
* console.log(new ConsoleHandler())
|
14191
14338
|
* </script>
|
14192
14339
|
* ```
|
@@ -14262,7 +14409,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
14262
14409
|
*
|
14263
14410
|
* ```
|
14264
14411
|
* <script type="module">
|
14265
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14412
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
14266
14413
|
* Monster.Math.random(1,10)
|
14267
14414
|
* // ↦ 5
|
14268
14415
|
* </script>
|
@@ -14272,7 +14419,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
14272
14419
|
*
|
14273
14420
|
* ```
|
14274
14421
|
* <script type="module">
|
14275
|
-
* import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14422
|
+
* import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/math/random.js';
|
14276
14423
|
* random(1,10)
|
14277
14424
|
* // ↦ 5
|
14278
14425
|
* </script>
|
@@ -14429,7 +14576,7 @@ var internalCounter = 0;
|
|
14429
14576
|
*
|
14430
14577
|
* ```
|
14431
14578
|
* <script type="module">
|
14432
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14579
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
14433
14580
|
* console.log(new Monster.Types.RandomID())
|
14434
14581
|
* </script>
|
14435
14582
|
* ```
|
@@ -14438,7 +14585,7 @@ var internalCounter = 0;
|
|
14438
14585
|
*
|
14439
14586
|
* ```
|
14440
14587
|
* <script type="module">
|
14441
|
-
* import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14588
|
+
* import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/randomid.js';
|
14442
14589
|
* console.log(new RandomID())
|
14443
14590
|
* </script>
|
14444
14591
|
* ```
|
@@ -14521,7 +14668,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14521
14668
|
*
|
14522
14669
|
* ```
|
14523
14670
|
* <script type="module">
|
14524
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14671
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
14525
14672
|
* console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3
|
14526
14673
|
* console.log(new Monster.Types.Version('1')) // ↦ 1.0.0
|
14527
14674
|
* </script>
|
@@ -14531,7 +14678,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14531
14678
|
*
|
14532
14679
|
* ```
|
14533
14680
|
* <script type="module">
|
14534
|
-
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14681
|
+
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/version.js';
|
14535
14682
|
* console.log(new Version('1.2.3')) // ↦ 1.2.3
|
14536
14683
|
* console.log(new Version('1')) // ↦ 1.0.0
|
14537
14684
|
* </script>
|
@@ -14539,7 +14686,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14539
14686
|
*
|
14540
14687
|
* @example
|
14541
14688
|
*
|
14542
|
-
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14689
|
+
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/version.js';
|
14543
14690
|
*
|
14544
14691
|
* new Version('1.0.0') // ↦ 1.0.0
|
14545
14692
|
* new Version(1) // ↦ 1.0.0
|
@@ -14673,7 +14820,7 @@ var monsterVersion;
|
|
14673
14820
|
*
|
14674
14821
|
* ```
|
14675
14822
|
* <script type="module">
|
14676
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14823
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
14677
14824
|
* console.log(Monster.getVersion())
|
14678
14825
|
* </script>
|
14679
14826
|
* ```
|
@@ -14682,7 +14829,7 @@ var monsterVersion;
|
|
14682
14829
|
*
|
14683
14830
|
* ```
|
14684
14831
|
* <script type="module">
|
14685
|
-
* import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14832
|
+
* import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/types/version.js';
|
14686
14833
|
* console.log(getVersion())
|
14687
14834
|
* </script>
|
14688
14835
|
* ```
|
@@ -14701,7 +14848,7 @@ function getVersion() {
|
|
14701
14848
|
/**#@+ dont touch, replaced by make with package.json version */
|
14702
14849
|
|
14703
14850
|
|
14704
|
-
monsterVersion = new Version('1.
|
14851
|
+
monsterVersion = new Version('1.29.3');
|
14705
14852
|
/**#@-*/
|
14706
14853
|
|
14707
14854
|
return monsterVersion;
|
@@ -14757,7 +14904,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14757
14904
|
*
|
14758
14905
|
* ```
|
14759
14906
|
* <script type="module">
|
14760
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14907
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
14761
14908
|
* new Monster.Util.Comparator()
|
14762
14909
|
* </script>
|
14763
14910
|
* ```
|
@@ -14766,7 +14913,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14766
14913
|
*
|
14767
14914
|
* ```
|
14768
14915
|
* <script type="module">
|
14769
|
-
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14916
|
+
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/util/comparator.js';
|
14770
14917
|
* console.log(new Comparator())
|
14771
14918
|
* </script>
|
14772
14919
|
* ```
|
@@ -14791,7 +14938,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
14791
14938
|
*
|
14792
14939
|
* @example
|
14793
14940
|
*
|
14794
|
-
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14941
|
+
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/util/comparator.js';
|
14795
14942
|
*
|
14796
14943
|
* console.log(new Comparator().lessThanOrEqual(2, 5))
|
14797
14944
|
* // ↦ true
|
@@ -15004,7 +15151,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
15004
15151
|
*
|
15005
15152
|
* ```
|
15006
15153
|
* <script type="module">
|
15007
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
15154
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/monster.js';
|
15008
15155
|
* Monster.Util.deepFreeze({})
|
15009
15156
|
* </script>
|
15010
15157
|
* ```
|
@@ -15013,7 +15160,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
15013
15160
|
*
|
15014
15161
|
* ```
|
15015
15162
|
* <script type="module">
|
15016
|
-
* import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
15163
|
+
* import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.3/dist/modules/util/freeze.js';
|
15017
15164
|
* deepFreeze({})
|
15018
15165
|
* </script>
|
15019
15166
|
* ```
|