@schukai/monster 1.15.5 → 1.17.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG +25 -0
- package/README.md +4 -4
- 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 +2 -2
- 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/diff.js +2 -2
- package/dist/modules/data/extend.js +1 -1
- package/dist/modules/data/namespace.js +2 -2
- package/dist/modules/data/pathfinder.js +2 -2
- 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 +1 -1
- package/dist/modules/dom/events.js +1 -1
- package/dist/modules/dom/locale.js +1 -1
- package/dist/modules/dom/namespace.js +2 -2
- package/dist/modules/dom/template.js +1 -1
- package/dist/modules/dom/theme.js +1 -1
- package/dist/modules/dom/updater.js +1 -1
- package/dist/modules/dom/util.js +1 -1
- package/dist/modules/i18n/locale.js +1 -1
- package/dist/modules/i18n/namespace.js +2 -2
- package/dist/modules/i18n/provider.js +1 -1
- package/dist/modules/i18n/providers/fetch.js +1 -1
- package/dist/modules/i18n/providers/namespace.js +2 -2
- package/dist/modules/i18n/translations.js +1 -1
- package/dist/modules/logging/handler/console.js +2 -2
- package/dist/modules/logging/handler/namespace.js +2 -2
- 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 +2 -2
- package/dist/modules/math/namespace.js +2 -2
- 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 +2 -2
- package/dist/modules/types/base.js +1 -1
- package/dist/modules/types/basewithoptions.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/namespace.js +2 -2
- 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/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/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/freeze.js +1 -1
- package/dist/modules/util/namespace.js +2 -2
- package/dist/monster.dev.js +1293 -943
- package/dist/monster.dev.js.map +1 -1
- package/dist/monster.js +2 -2
- package/package.json +1 -1
- package/source/constraints/abstract.js +1 -1
- package/source/constraints/abstractoperator.js +1 -1
- package/source/constraints/andoperator.js +6 -6
- package/source/constraints/invalid.js +4 -4
- package/source/constraints/isarray.js +4 -4
- package/source/constraints/isobject.js +4 -4
- package/source/constraints/namespace.js +3 -2
- package/source/constraints/oroperator.js +6 -6
- package/source/constraints/valid.js +4 -4
- package/source/data/buildmap.js +245 -12
- package/source/data/diff.js +7 -6
- package/source/data/extend.js +3 -3
- package/source/data/namespace.js +3 -2
- package/source/data/pathfinder.js +15 -11
- package/source/data/pipe.js +4 -4
- package/source/data/transformer.js +4 -4
- package/source/dom/assembler.js +4 -4
- package/source/dom/attributes.js +36 -46
- package/source/dom/constants.js +16 -14
- package/source/dom/customcontrol.js +12 -8
- package/source/dom/customelement.js +24 -11
- package/source/dom/events.js +6 -6
- package/source/dom/locale.js +5 -4
- package/source/dom/namespace.js +3 -2
- package/source/dom/template.js +6 -6
- package/source/dom/theme.js +5 -4
- package/source/dom/updater.js +11 -5
- package/source/dom/util.js +9 -9
- package/source/i18n/locale.js +27 -15
- package/source/i18n/namespace.js +3 -2
- package/source/i18n/provider.js +3 -3
- package/source/i18n/providers/fetch.js +22 -6
- package/source/i18n/providers/namespace.js +3 -2
- package/source/i18n/translations.js +3 -3
- package/source/logging/handler/console.js +34 -10
- package/source/logging/handler/namespace.js +3 -2
- package/source/logging/handler.js +4 -4
- package/source/logging/logentry.js +5 -5
- package/source/logging/logger.js +13 -13
- package/source/logging/namespace.js +3 -2
- package/source/math/namespace.js +3 -2
- package/source/math/random.js +3 -3
- package/source/namespace.js +1 -1
- package/source/text/formatter.js +3 -3
- package/source/text/namespace.js +3 -2
- package/source/types/base.js +3 -3
- package/source/types/basewithoptions.js +3 -3
- package/source/types/global.js +7 -7
- package/source/types/id.js +3 -3
- package/source/types/is.js +30 -30
- package/source/types/namespace.js +3 -2
- package/source/types/observer.js +4 -4
- package/source/types/observerlist.js +3 -3
- package/source/types/proxyobserver.js +6 -6
- package/source/types/queue.js +4 -4
- package/source/types/randomid.js +3 -3
- package/source/types/stack.js +3 -3
- package/source/types/tokenlist.js +3 -3
- package/source/types/typeof.js +4 -4
- package/source/types/uniquequeue.js +3 -3
- package/source/types/validate.js +34 -34
- package/source/types/version.js +7 -7
- package/source/util/clone.js +3 -3
- package/source/util/comparator.js +37 -7
- package/source/util/freeze.js +4 -4
- package/source/util/namespace.js +3 -2
- package/test/cases/data/buildmap.js +242 -16
- package/test/cases/data/diff.js +36 -3
- package/test/cases/data/pathfinder.js +298 -196
- package/test/cases/logging/handler/console.js +20 -0
- package/test/cases/monster.js +1 -1
- 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 +2 -2
- package/test/web/tests.js +3 -3
package/source/types/is.js
CHANGED
@@ -13,7 +13,7 @@ import {assignToNamespace, Monster} from '../namespace.js';
|
|
13
13
|
*
|
14
14
|
* ```
|
15
15
|
* <script type="module">
|
16
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
16
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
17
17
|
* console.log(Monster.Types.isIterable(null)) // ↦ false
|
18
18
|
* console.log(Monster.Types.isIterable('hello')) // ↦ true
|
19
19
|
* console.log(Monster.Types.isIterable([])) // ↦ true
|
@@ -24,7 +24,7 @@ import {assignToNamespace, Monster} from '../namespace.js';
|
|
24
24
|
*
|
25
25
|
* ```
|
26
26
|
* <script type="module">
|
27
|
-
* import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
27
|
+
* import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
28
28
|
* console.log(isIterable(null)) // ↦ false
|
29
29
|
* console.log(isIterable('hello')) // ↦ true
|
30
30
|
* console.log(isIterable([])) // ↦ true
|
@@ -35,7 +35,7 @@ import {assignToNamespace, Monster} from '../namespace.js';
|
|
35
35
|
* @returns {boolean}
|
36
36
|
* @since 1.2.0
|
37
37
|
* @copyright schukai GmbH
|
38
|
-
* @memberOf Monster
|
38
|
+
* @memberOf Monster.Types
|
39
39
|
*/
|
40
40
|
function isIterable(value) {
|
41
41
|
if (value === undefined) return false;
|
@@ -51,7 +51,7 @@ function isIterable(value) {
|
|
51
51
|
*
|
52
52
|
* ```
|
53
53
|
* <script type="module">
|
54
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
54
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
55
55
|
* console.log(Monster.Types.isPrimitive('2')) // ↦ false
|
56
56
|
* console.log(Monster.Types.isPrimitive([])) // ↦ true
|
57
57
|
* </script>
|
@@ -61,7 +61,7 @@ function isIterable(value) {
|
|
61
61
|
*
|
62
62
|
* ```
|
63
63
|
* <script type="module">
|
64
|
-
* import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
64
|
+
* import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
65
65
|
* console.log(isPrimitive('2')) // ↦ true
|
66
66
|
* console.log(isPrimitive([])) // ↦ false
|
67
67
|
* </script>
|
@@ -71,7 +71,7 @@ function isIterable(value) {
|
|
71
71
|
* @returns {boolean}
|
72
72
|
* @since 1.0.0
|
73
73
|
* @copyright schukai GmbH
|
74
|
-
* @memberOf Monster
|
74
|
+
* @memberOf Monster.Types
|
75
75
|
*/
|
76
76
|
function isPrimitive(value) {
|
77
77
|
var type;
|
@@ -96,7 +96,7 @@ function isPrimitive(value) {
|
|
96
96
|
*
|
97
97
|
* ```
|
98
98
|
* <script type="module">
|
99
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
99
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
100
100
|
* console.log(Monster.Types.isSymbol('2')) // ↦ false
|
101
101
|
* console.log(Monster.Types.isSymbol(Symbol('test')) // ↦ true
|
102
102
|
* </script>
|
@@ -106,7 +106,7 @@ function isPrimitive(value) {
|
|
106
106
|
*
|
107
107
|
* ```
|
108
108
|
* <script type="module">
|
109
|
-
* import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
109
|
+
* import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
110
110
|
* console.log(isSymbol(Symbol('a'))) // ↦ true
|
111
111
|
* console.log(isSymbol([]) // ↦ false
|
112
112
|
* </script>
|
@@ -116,7 +116,7 @@ function isPrimitive(value) {
|
|
116
116
|
* @returns {boolean}
|
117
117
|
* @since 1.9.0
|
118
118
|
* @copyright schukai GmbH
|
119
|
-
* @memberOf Monster
|
119
|
+
* @memberOf Monster.Types
|
120
120
|
*/
|
121
121
|
function isSymbol(value) {
|
122
122
|
return ('symbol' === typeof value) ? true : false;
|
@@ -129,7 +129,7 @@ function isSymbol(value) {
|
|
129
129
|
*
|
130
130
|
* ```
|
131
131
|
* <script type="module">
|
132
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
132
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
133
133
|
* console.log(Monster.Types.isBoolean('2')) // ↦ false
|
134
134
|
* console.log(Monster.Types.isBoolean([])) // ↦ false
|
135
135
|
* console.log(Monster.Types.isBoolean(true)) // ↦ true
|
@@ -140,7 +140,7 @@ function isSymbol(value) {
|
|
140
140
|
*
|
141
141
|
* ```
|
142
142
|
* <script type="module">
|
143
|
-
* import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
143
|
+
* import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
144
144
|
* console.log(isBoolean('2')) // ↦ false
|
145
145
|
* console.log(isBoolean([])) // ↦ false
|
146
146
|
* console.log(isBoolean(2>4)) // ↦ true
|
@@ -151,7 +151,7 @@ function isSymbol(value) {
|
|
151
151
|
* @returns {boolean}
|
152
152
|
* @since 1.0.0
|
153
153
|
* @copyright schukai GmbH
|
154
|
-
* @memberOf Monster
|
154
|
+
* @memberOf Monster.Types
|
155
155
|
*/
|
156
156
|
function isBoolean(value) {
|
157
157
|
|
@@ -169,7 +169,7 @@ function isBoolean(value) {
|
|
169
169
|
*
|
170
170
|
* ```
|
171
171
|
* <script type="module">
|
172
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
172
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
173
173
|
* console.log(Monster.Types.isString('2')) // ↦ true
|
174
174
|
* console.log(Monster.Types.isString([])) // ↦ false
|
175
175
|
* </script>
|
@@ -179,7 +179,7 @@ function isBoolean(value) {
|
|
179
179
|
*
|
180
180
|
* ```
|
181
181
|
* <script type="module">
|
182
|
-
* import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
182
|
+
* import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
183
183
|
* console.log(isString('2')) // ↦ true
|
184
184
|
* console.log(isString([])) // ↦ false
|
185
185
|
* </script>
|
@@ -189,7 +189,7 @@ function isBoolean(value) {
|
|
189
189
|
* @returns {boolean}
|
190
190
|
* @since 1.0.0
|
191
191
|
* @copyright schukai GmbH
|
192
|
-
* @memberOf Monster
|
192
|
+
* @memberOf Monster.Types
|
193
193
|
*/
|
194
194
|
function isString(value) {
|
195
195
|
if (value === undefined || typeof value !== 'string') {
|
@@ -205,7 +205,7 @@ function isString(value) {
|
|
205
205
|
*
|
206
206
|
* ```
|
207
207
|
* <script type="module">
|
208
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
208
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
209
209
|
* console.log(Monster.Types.isObject('2')) // ↦ false
|
210
210
|
* console.log(Monster.Types.isObject([])) // ↦ false
|
211
211
|
* console.log(Monster.Types.isObject({})) // ↦ true
|
@@ -216,7 +216,7 @@ function isString(value) {
|
|
216
216
|
*
|
217
217
|
* ```
|
218
218
|
* <script type="module">
|
219
|
-
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
219
|
+
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
220
220
|
* console.log(isObject('2')) // ↦ false
|
221
221
|
* console.log(isObject([])) // ↦ false
|
222
222
|
* </script>
|
@@ -226,7 +226,7 @@ function isString(value) {
|
|
226
226
|
* @returns {boolean}
|
227
227
|
* @since 1.0.0
|
228
228
|
* @copyright schukai GmbH
|
229
|
-
* @memberOf Monster
|
229
|
+
* @memberOf Monster.Types
|
230
230
|
*/
|
231
231
|
function isObject(value) {
|
232
232
|
|
@@ -247,7 +247,7 @@ function isObject(value) {
|
|
247
247
|
*
|
248
248
|
* ```
|
249
249
|
* <script type="module">
|
250
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
250
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
251
251
|
* console.log(Monster.Types.isInstance('2')) // ↦ false
|
252
252
|
* console.log(Monster.Types.isInstance([])) // ↦ false
|
253
253
|
* console.log(Monster.Types.isInstance({})) // ↦ true
|
@@ -258,7 +258,7 @@ function isObject(value) {
|
|
258
258
|
*
|
259
259
|
* ```
|
260
260
|
* <script type="module">
|
261
|
-
* import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
261
|
+
* import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
262
262
|
* console.log(isInstance('2')) // ↦ false
|
263
263
|
* console.log(isInstance([])) // ↦ false
|
264
264
|
* </script>
|
@@ -269,7 +269,7 @@ function isObject(value) {
|
|
269
269
|
* @returns {boolean}
|
270
270
|
* @since 1.5.0
|
271
271
|
* @copyright schukai GmbH
|
272
|
-
* @memberOf Monster
|
272
|
+
* @memberOf Monster.Types
|
273
273
|
*/
|
274
274
|
function isInstance(value, instance) {
|
275
275
|
|
@@ -287,7 +287,7 @@ function isInstance(value, instance) {
|
|
287
287
|
*
|
288
288
|
* ```
|
289
289
|
* <script type="module">
|
290
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
290
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
291
291
|
* console.log(Monster.Types.isArray('2')) // ↦ false
|
292
292
|
* console.log(Monster.Types.isArray([])) // ↦ true
|
293
293
|
* </script>
|
@@ -297,7 +297,7 @@ function isInstance(value, instance) {
|
|
297
297
|
*
|
298
298
|
* ```
|
299
299
|
* <script type="module">
|
300
|
-
* import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
300
|
+
* import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
301
301
|
* console.log(isArray('2')) // ↦ false
|
302
302
|
* console.log(isArray([])) // ↦ true
|
303
303
|
* </script>
|
@@ -307,7 +307,7 @@ function isInstance(value, instance) {
|
|
307
307
|
* @returns {boolean}
|
308
308
|
* @since 1.0.0
|
309
309
|
* @copyright schukai GmbH
|
310
|
-
* @memberOf Monster
|
310
|
+
* @memberOf Monster.Types
|
311
311
|
*/
|
312
312
|
function isArray(value) {
|
313
313
|
if (Array.isArray(value)) {
|
@@ -323,7 +323,7 @@ function isArray(value) {
|
|
323
323
|
*
|
324
324
|
* ```
|
325
325
|
* <script type="module">
|
326
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
326
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
327
327
|
* console.log(Monster.Types.isFunction(()=>{})) // ↦ true
|
328
328
|
* console.log(Monster.Types.isFunction('2')) // ↦ false
|
329
329
|
* console.log(Monster.Types.isFunction([])) // ↦ false
|
@@ -334,7 +334,7 @@ function isArray(value) {
|
|
334
334
|
*
|
335
335
|
* ```
|
336
336
|
* <script type="module">
|
337
|
-
* import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
337
|
+
* import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
338
338
|
* console.log(isFunction(()=>{})) // ↦ true
|
339
339
|
* console.log(isFunction('2')) // ↦ false
|
340
340
|
* console.log(isFunction([])) // ↦ false
|
@@ -345,7 +345,7 @@ function isArray(value) {
|
|
345
345
|
* @returns {boolean}
|
346
346
|
* @since 1.0.0
|
347
347
|
* @copyright schukai GmbH
|
348
|
-
* @memberOf Monster
|
348
|
+
* @memberOf Monster.Types
|
349
349
|
*/
|
350
350
|
function isFunction(value) {
|
351
351
|
if (isArray(value)) return false;
|
@@ -366,7 +366,7 @@ function isFunction(value) {
|
|
366
366
|
*
|
367
367
|
* ```
|
368
368
|
* <script type="module">
|
369
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
369
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
370
370
|
* console.log(Monster.Types.isInteger(()=>{})) // ↦ true
|
371
371
|
* console.log(Monster.Types.isInteger('2')) // ↦ false
|
372
372
|
* console.log(Monster.Types.isInteger(2)) // ↦ true
|
@@ -377,7 +377,7 @@ function isFunction(value) {
|
|
377
377
|
*
|
378
378
|
* ```
|
379
379
|
* <script type="module">
|
380
|
-
* import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
380
|
+
* import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
381
381
|
* console.log(isInteger(()=>{})) // ↦ true
|
382
382
|
* console.log(isInteger('2')) // ↦ false
|
383
383
|
* console.log(isInteger(2)) // ↦ true
|
@@ -388,7 +388,7 @@ function isFunction(value) {
|
|
388
388
|
* @returns {boolean}
|
389
389
|
* @since 1.4.0
|
390
390
|
* @copyright schukai GmbH
|
391
|
-
* @memberOf Monster
|
391
|
+
* @memberOf Monster.Types
|
392
392
|
*/
|
393
393
|
function isInteger(value) {
|
394
394
|
return Number.isInteger(value);
|
@@ -3,7 +3,8 @@
|
|
3
3
|
/**
|
4
4
|
* Namespace for types.
|
5
5
|
*
|
6
|
-
* @namespace Monster
|
6
|
+
* @namespace Monster.Types
|
7
|
+
* @memberOf Monster
|
7
8
|
* @author schukai GmbH
|
8
9
|
*/
|
9
10
|
|
@@ -12,4 +13,4 @@
|
|
12
13
|
* @private
|
13
14
|
* @type {string}
|
14
15
|
*/
|
15
|
-
const namespace = "Monster.Types";
|
16
|
+
export const namespace = "Monster.Types";
|
package/source/types/observer.js
CHANGED
@@ -17,7 +17,7 @@ import {UniqueQueue} from './uniquequeue.js';
|
|
17
17
|
*
|
18
18
|
* ```
|
19
19
|
* <script type="module">
|
20
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
20
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/observer.js';
|
21
21
|
* console.log(new Monster.Types.Observer())
|
22
22
|
* </script>
|
23
23
|
* ```
|
@@ -26,7 +26,7 @@ import {UniqueQueue} from './uniquequeue.js';
|
|
26
26
|
*
|
27
27
|
* ```
|
28
28
|
* <script type="module">
|
29
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
29
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/observer.js';
|
30
30
|
* console.log(new Observer())
|
31
31
|
* </script>
|
32
32
|
* ```
|
@@ -60,7 +60,7 @@ import {UniqueQueue} from './uniquequeue.js';
|
|
60
60
|
*
|
61
61
|
* @example
|
62
62
|
*
|
63
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
63
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/observer.js';
|
64
64
|
*
|
65
65
|
* const observer = new Observer(function(a, b, c) {
|
66
66
|
* console.log(this, a, b, c); // ↦ "a", 2, true
|
@@ -71,7 +71,7 @@ import {UniqueQueue} from './uniquequeue.js';
|
|
71
71
|
*
|
72
72
|
* @since 1.0.0
|
73
73
|
* @copyright schukai GmbH
|
74
|
-
* @memberOf Monster
|
74
|
+
* @memberOf Monster.Types
|
75
75
|
*/
|
76
76
|
class Observer extends Base {
|
77
77
|
|
@@ -16,7 +16,7 @@ import {validateInstance} from "./validate.js";
|
|
16
16
|
*
|
17
17
|
* ```
|
18
18
|
* <script type="module">
|
19
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
19
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/observerlist.js';
|
20
20
|
* console.log(new Monster.Types.ObserverList())
|
21
21
|
* console.log(new Monster.Types.ObserverList())
|
22
22
|
* </script>
|
@@ -26,7 +26,7 @@ import {validateInstance} from "./validate.js";
|
|
26
26
|
*
|
27
27
|
* ```
|
28
28
|
* <script type="module">
|
29
|
-
* import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
29
|
+
* import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/observerlist.js';
|
30
30
|
* console.log(ObserverList())
|
31
31
|
* console.log(ObserverList())
|
32
32
|
* </script>
|
@@ -34,7 +34,7 @@ import {validateInstance} from "./validate.js";
|
|
34
34
|
*
|
35
35
|
* @since 1.0.0
|
36
36
|
* @copyright schukai GmbH
|
37
|
-
* @memberOf Monster
|
37
|
+
* @memberOf Monster.Types
|
38
38
|
*/
|
39
39
|
class ObserverList extends Base {
|
40
40
|
|
@@ -17,7 +17,7 @@ import {validateObject} from "./validate.js";
|
|
17
17
|
*
|
18
18
|
* ```
|
19
19
|
* <script type="module">
|
20
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
20
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/proxyobserver.js';
|
21
21
|
* console.log(new Monster.Types.ProxyObserver())
|
22
22
|
* </script>
|
23
23
|
* ```
|
@@ -26,7 +26,7 @@ import {validateObject} from "./validate.js";
|
|
26
26
|
*
|
27
27
|
* ```
|
28
28
|
* <script type="module">
|
29
|
-
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
29
|
+
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/proxyobserver.js';
|
30
30
|
* console.log(new ProxyObserver())
|
31
31
|
* </script>
|
32
32
|
* ```
|
@@ -37,9 +37,9 @@ import {validateObject} from "./validate.js";
|
|
37
37
|
*
|
38
38
|
* @example
|
39
39
|
*
|
40
|
-
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
41
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
42
|
-
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
40
|
+
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/proxyobserver.js';
|
41
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/observer.js';
|
42
|
+
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/is.js';
|
43
43
|
*
|
44
44
|
* const o = new Observer(function () {
|
45
45
|
* if (isObject(this) && this instanceof ProxyObserver) {
|
@@ -65,7 +65,7 @@ import {validateObject} from "./validate.js";
|
|
65
65
|
*
|
66
66
|
* @since 1.0.0
|
67
67
|
* @copyright schukai GmbH
|
68
|
-
* @memberOf Monster
|
68
|
+
* @memberOf Monster.Types
|
69
69
|
*/
|
70
70
|
class ProxyObserver extends Base {
|
71
71
|
|
package/source/types/queue.js
CHANGED
@@ -11,7 +11,7 @@ import {Base} from './base.js';
|
|
11
11
|
*
|
12
12
|
* ```
|
13
13
|
* <script type="module">
|
14
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/queue.js';
|
15
15
|
* console.log(new Monster.Types.Queue())
|
16
16
|
* </script>
|
17
17
|
* ```
|
@@ -20,14 +20,14 @@ import {Base} from './base.js';
|
|
20
20
|
*
|
21
21
|
* ```
|
22
22
|
* <script type="module">
|
23
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
23
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/queue.js';
|
24
24
|
* console.log(new Queue())
|
25
25
|
* </script>
|
26
26
|
* ```
|
27
27
|
*
|
28
28
|
* @example
|
29
29
|
*
|
30
|
-
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
30
|
+
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/queue.js';
|
31
31
|
*
|
32
32
|
* const queue = new Queue;
|
33
33
|
*
|
@@ -50,7 +50,7 @@ import {Base} from './base.js';
|
|
50
50
|
*
|
51
51
|
* @since 1.4.0
|
52
52
|
* @copyright schukai GmbH
|
53
|
-
* @memberOf Monster
|
53
|
+
* @memberOf Monster.Types
|
54
54
|
*/
|
55
55
|
class Queue extends Base {
|
56
56
|
|
package/source/types/randomid.js
CHANGED
@@ -19,7 +19,7 @@ let internalCounter = 0;
|
|
19
19
|
*
|
20
20
|
* ```
|
21
21
|
* <script type="module">
|
22
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
22
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/randomid.js';
|
23
23
|
* console.log(new Monster.Types.RandomID())
|
24
24
|
* </script>
|
25
25
|
* ```
|
@@ -28,14 +28,14 @@ let internalCounter = 0;
|
|
28
28
|
*
|
29
29
|
* ```
|
30
30
|
* <script type="module">
|
31
|
-
* import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
31
|
+
* import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/randomid.js';
|
32
32
|
* console.log(new RandomID())
|
33
33
|
* </script>
|
34
34
|
* ```
|
35
35
|
*
|
36
36
|
* @since 1.6.0
|
37
37
|
* @copyright schukai GmbH
|
38
|
-
* @memberOf Monster
|
38
|
+
* @memberOf Monster.Types
|
39
39
|
*/
|
40
40
|
class RandomID extends ID {
|
41
41
|
|
package/source/types/stack.js
CHANGED
@@ -12,7 +12,7 @@ import {Base} from './base.js';
|
|
12
12
|
*
|
13
13
|
* ```
|
14
14
|
* <script type="module">
|
15
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
15
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/stack.js';
|
16
16
|
* console.log(new Monster.Types.Stack())
|
17
17
|
* </script>
|
18
18
|
* ```
|
@@ -21,14 +21,14 @@ import {Base} from './base.js';
|
|
21
21
|
*
|
22
22
|
* ```
|
23
23
|
* <script type="module">
|
24
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
24
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/stack.js';
|
25
25
|
* console.log(new Stack())
|
26
26
|
* </script>
|
27
27
|
* ```
|
28
28
|
*
|
29
29
|
* @since 1.4.0
|
30
30
|
* @copyright schukai GmbH
|
31
|
-
* @memberOf Monster
|
31
|
+
* @memberOf Monster.Types
|
32
32
|
*/
|
33
33
|
class Stack extends Base {
|
34
34
|
|
@@ -18,7 +18,7 @@ import {Base} from './base.js';
|
|
18
18
|
*
|
19
19
|
* ```
|
20
20
|
* <script type="module">
|
21
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
21
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/tokenlist.js';
|
22
22
|
* console.log(new Monster.Types.TokenList("myclass row"))
|
23
23
|
* console.log(new Monster.Types.TokenList("myclass row"))
|
24
24
|
* </script>
|
@@ -28,7 +28,7 @@ import {Base} from './base.js';
|
|
28
28
|
*
|
29
29
|
* ```
|
30
30
|
* <script type="module">
|
31
|
-
* import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
31
|
+
* import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/tokenlist.js';
|
32
32
|
* console.log(new TokenList("myclass row"))
|
33
33
|
* console.log(new TokenList("myclass row"))
|
34
34
|
* </script>
|
@@ -42,7 +42,7 @@ import {Base} from './base.js';
|
|
42
42
|
*
|
43
43
|
* @since 1.2.0
|
44
44
|
* @copyright schukai GmbH
|
45
|
-
* @memberOf Monster
|
45
|
+
* @memberOf Monster.Types
|
46
46
|
*/
|
47
47
|
class TokenList extends Base {
|
48
48
|
|
package/source/types/typeof.js
CHANGED
@@ -14,7 +14,7 @@ import {assignToNamespace, Monster} from '../namespace.js';
|
|
14
14
|
*
|
15
15
|
* ```
|
16
16
|
* <script type="module">
|
17
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
17
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/typeof.js';
|
18
18
|
* console.log(Monster.Types.typeOf())
|
19
19
|
* </script>
|
20
20
|
* ```
|
@@ -23,14 +23,14 @@ import {assignToNamespace, Monster} from '../namespace.js';
|
|
23
23
|
*
|
24
24
|
* ```
|
25
25
|
* <script type="module">
|
26
|
-
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
26
|
+
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/typeof.js';
|
27
27
|
* console.log(typeOf())
|
28
28
|
* </script>
|
29
29
|
* ```
|
30
30
|
*
|
31
31
|
* @example
|
32
32
|
*
|
33
|
-
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
33
|
+
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/typeof.js';
|
34
34
|
*
|
35
35
|
* console.log(typeOf(undefined)); // ↦ undefined
|
36
36
|
* console.log(typeOf("")); // ↦ string
|
@@ -44,7 +44,7 @@ import {assignToNamespace, Monster} from '../namespace.js';
|
|
44
44
|
* @return {string}
|
45
45
|
* @since 1.7.0
|
46
46
|
* @copyright schukai GmbH
|
47
|
-
* @memberOf Monster
|
47
|
+
* @memberOf Monster.Types
|
48
48
|
* @throws {TypeError} value is not a primitive
|
49
49
|
*/
|
50
50
|
function typeOf(value) {
|
@@ -13,7 +13,7 @@ import {validateObject} from "./validate.js";
|
|
13
13
|
*
|
14
14
|
* ```
|
15
15
|
* <script type="module">
|
16
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
16
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/uniquequeue.js';
|
17
17
|
* console.log(new Monster.Types.UniqueQueue())
|
18
18
|
* </script>
|
19
19
|
* ```
|
@@ -22,14 +22,14 @@ import {validateObject} from "./validate.js";
|
|
22
22
|
*
|
23
23
|
* ```
|
24
24
|
* <script type="module">
|
25
|
-
* import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
25
|
+
* import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.17.1/dist/modules/types/uniquequeue.js';
|
26
26
|
* console.log(new UniqueQueue())
|
27
27
|
* </script>
|
28
28
|
* ```
|
29
29
|
*
|
30
30
|
* @since 1.4.0
|
31
31
|
* @copyright schukai GmbH
|
32
|
-
* @memberOf Monster
|
32
|
+
* @memberOf Monster.Types
|
33
33
|
*/
|
34
34
|
class UniqueQueue extends Queue {
|
35
35
|
|