@schukai/monster 3.80.2 → 3.80.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +15 -0
- package/package.json +1 -1
- package/source/components/content/copy.mjs +7 -4
- package/source/components/datatable/change-button.mjs +1 -1
- package/source/components/datatable/columnbar.mjs +1 -1
- package/source/components/datatable/dataset.mjs +3 -3
- package/source/components/datatable/datasource/dom.mjs +2 -2
- package/source/components/datatable/datasource/rest.mjs +7 -7
- package/source/components/datatable/datasource.mjs +3 -3
- package/source/components/datatable/datatable/header.mjs +11 -11
- package/source/components/datatable/datatable.mjs +15 -15
- package/source/components/datatable/embedded-pagination.mjs +2 -2
- package/source/components/datatable/filter/date-range.mjs +5 -5
- package/source/components/datatable/filter/input.mjs +2 -2
- package/source/components/datatable/filter/range.mjs +3 -3
- package/source/components/datatable/filter/settings.mjs +5 -5
- package/source/components/datatable/filter/util.mjs +3 -3
- package/source/components/datatable/filter-button.mjs +1 -1
- package/source/components/datatable/filter.mjs +11 -11
- package/source/components/datatable/pagination.mjs +3 -3
- package/source/components/datatable/save-button.mjs +1 -1
- package/source/components/datatable/status.mjs +1 -1
- package/source/components/form/action-button.mjs +2 -2
- package/source/components/form/api-button.mjs +1 -1
- package/source/components/form/button-bar.mjs +3 -3
- package/source/components/form/confirm-button.mjs +4 -4
- package/source/components/form/context-error.mjs +4 -4
- package/source/components/form/context-help.mjs +1 -1
- package/source/components/form/field-set.mjs +2 -2
- package/source/components/form/form.mjs +3 -3
- package/source/components/form/message-state-button.mjs +6 -6
- package/source/components/form/popper-button.mjs +1 -1
- package/source/components/form/reload.mjs +5 -22
- package/source/components/form/select.mjs +11 -10
- package/source/components/form/shadow-reload.mjs +1 -1
- package/source/components/form/state-button.mjs +1 -1
- package/source/components/form/template.mjs +4 -4
- package/source/components/form/toggle-switch.mjs +1 -1
- package/source/components/form/tree-select.mjs +1 -1
- package/source/components/form/util/floating-ui.mjs +1 -1
- package/source/components/host/call-button.mjs +1 -1
- package/source/components/host/config-manager.mjs +6 -6
- package/source/components/host/host.mjs +8 -8
- package/source/components/host/overlay.mjs +13 -13
- package/source/components/host/toggle-button.mjs +1 -1
- package/source/components/host/util.mjs +1 -1
- package/source/components/host/viewer.mjs +5 -5
- package/source/components/layout/collapse.mjs +20 -19
- package/source/components/layout/details.mjs +5 -5
- package/source/components/layout/iframe.mjs +2 -2
- package/source/components/layout/panel.mjs +3 -3
- package/source/components/layout/popper.mjs +1 -1
- package/source/components/layout/slider.mjs +6 -6
- package/source/components/layout/split-panel.mjs +3 -3
- package/source/components/layout/tabs.mjs +3 -9
- package/source/components/layout/width-toggle.mjs +4 -4
- package/source/components/navigation/table-of-content.mjs +3 -3
- package/source/components/notify/message.mjs +0 -1
- package/source/components/state/log/entry.mjs +6 -6
- package/source/components/state/log.mjs +3 -39
- package/source/components/state/state.mjs +1 -1
- package/source/components/tree-menu/dragable-tree-menu.mjs +2 -2
- package/source/components/tree-menu/tree-menu.mjs +1 -1
- package/source/constraints/abstract.mjs +2 -2
- package/source/constraints/abstractoperator.mjs +1 -1
- package/source/constraints/andoperator.mjs +5 -5
- package/source/constraints/invalid.mjs +5 -5
- package/source/constraints/isarray.mjs +5 -5
- package/source/constraints/isobject.mjs +5 -5
- package/source/constraints/oroperator.mjs +5 -5
- package/source/constraints/valid.mjs +4 -4
- package/source/data/buildmap.mjs +2 -1
- package/source/data/datasource/dom.mjs +1 -1
- package/source/data/datasource/server/restapi/data-fetch-error.mjs +1 -1
- package/source/data/datasource/server/restapi/writeerror.mjs +1 -1
- package/source/data/datasource/server/restapi.mjs +2 -2
- package/source/data/datasource/server/webconnect.mjs +4 -4
- package/source/data/datasource/server.mjs +5 -5
- package/source/data/datasource/storage/localstorage.mjs +1 -1
- package/source/data/datasource/storage/sessionstorage.mjs +1 -1
- package/source/data/datasource/storage.mjs +1 -1
- package/source/data/datasource.mjs +4 -5
- package/source/data/pathfinder.mjs +10 -9
- package/source/data/pipe.mjs +5 -4
- package/source/data/transformer.mjs +23 -11
- package/source/dom/assembler.mjs +2 -2
- package/source/dom/attributes.mjs +2 -2
- package/source/dom/customcontrol.mjs +1 -1
- package/source/dom/customelement.mjs +36 -67
- package/source/dom/dimension.mjs +3 -3
- package/source/dom/focusmanager.mjs +1 -1
- package/source/dom/locale.mjs +1 -1
- package/source/dom/resource/data.mjs +1 -1
- package/source/dom/resource/link/stylesheet.mjs +1 -1
- package/source/dom/resource/link.mjs +1 -1
- package/source/dom/resource/script.mjs +1 -1
- package/source/dom/template.mjs +2 -2
- package/source/dom/theme.mjs +2 -2
- package/source/dom/updater.mjs +5 -6
- package/source/dom/util/extract-keys.mjs +1 -1
- package/source/dom/util/init-options-from-attributes.mjs +1 -1
- package/source/dom/util/set-option-from-attribute.mjs +1 -1
- package/source/dom/util.mjs +9 -9
- package/source/i18n/formatter.mjs +1 -1
- package/source/i18n/locale.mjs +2 -2
- package/source/i18n/provider.mjs +1 -1
- package/source/i18n/providers/embed.mjs +1 -3
- package/source/i18n/translations.mjs +2 -2
- package/source/logging/handler/console.mjs +1 -1
- package/source/logging/handler.mjs +11 -11
- package/source/logging/logentry.mjs +2 -2
- package/source/logging/logger.mjs +11 -11
- package/source/math/random.mjs +2 -2
- package/source/monster.mjs +1 -0
- package/source/net/webconnect/message.mjs +3 -3
- package/source/net/webconnect.mjs +10 -10
- package/source/text/bracketed-key-value-hash.mjs +2 -2
- package/source/text/generate-range-comparison-expression.mjs +1 -1
- package/source/types/base.mjs +4 -4
- package/source/types/basewithoptions.mjs +3 -4
- package/source/types/dataurl.mjs +6 -8
- package/source/types/global.mjs +2 -2
- package/source/types/internal.mjs +3 -3
- package/source/types/is.mjs +10 -20
- package/source/types/mediatype.mjs +1 -1
- package/source/types/node.mjs +1 -1
- package/source/types/nodelist.mjs +7 -7
- package/source/types/observablequeue.mjs +7 -7
- package/source/types/observer.mjs +6 -6
- package/source/types/proxyobserver.mjs +8 -8
- package/source/types/queue.mjs +3 -3
- package/source/types/stack.mjs +3 -3
- package/source/types/tokenlist.mjs +12 -12
- package/source/types/uniquequeue.mjs +2 -2
- package/source/types/version.mjs +4 -4
- package/source/util/clone.mjs +2 -2
- package/source/util/comparator.mjs +1 -2
- package/source/util/deadmansswitch.mjs +7 -5
- package/source/util/freeze.mjs +1 -1
- package/source/util/processing.mjs +2 -2
- package/source/util/runtime.mjs +1 -1
package/source/types/is.mjs
CHANGED
@@ -34,11 +34,10 @@ export {
|
|
34
34
|
*
|
35
35
|
* @externalExample ../../example/types/is-1.mjs
|
36
36
|
* @param {*} value
|
37
|
-
* @
|
37
|
+
* @return {boolean}
|
38
38
|
* @license AGPLv3
|
39
39
|
* @since 1.2.0
|
40
40
|
* @copyright schukai GmbH
|
41
|
-
* @memberOf Monster.Types
|
42
41
|
*/
|
43
42
|
function isIterable(value) {
|
44
43
|
if (value === undefined) return false;
|
@@ -53,11 +52,10 @@ function isIterable(value) {
|
|
53
52
|
*
|
54
53
|
* @externalExample ../../example/types/is-2.mjs
|
55
54
|
* @param {*} value
|
56
|
-
* @
|
55
|
+
* @return {boolean}
|
57
56
|
* @license AGPLv3
|
58
57
|
* @since 1.0.0
|
59
58
|
* @copyright schukai GmbH
|
60
|
-
* @memberOf Monster.Types
|
61
59
|
*/
|
62
60
|
function isPrimitive(value) {
|
63
61
|
var type;
|
@@ -87,11 +85,10 @@ function isPrimitive(value) {
|
|
87
85
|
*
|
88
86
|
* @externalExample ../../example/types/is-3.mjs
|
89
87
|
* @param {*} value
|
90
|
-
* @
|
88
|
+
* @return {boolean}
|
91
89
|
* @license AGPLv3
|
92
90
|
* @since 1.9.0
|
93
91
|
* @copyright schukai GmbH
|
94
|
-
* @memberOf Monster.Types
|
95
92
|
*/
|
96
93
|
function isSymbol(value) {
|
97
94
|
return "symbol" === typeof value ? true : false;
|
@@ -104,11 +101,10 @@ function isSymbol(value) {
|
|
104
101
|
*
|
105
102
|
* @externalExample ../../example/types/is-4.mjs
|
106
103
|
* @param {*} value
|
107
|
-
* @
|
104
|
+
* @return {boolean}
|
108
105
|
* @license AGPLv3
|
109
106
|
* @since 1.0.0
|
110
107
|
* @copyright schukai GmbH
|
111
|
-
* @memberOf Monster.Types
|
112
108
|
*/
|
113
109
|
function isBoolean(value) {
|
114
110
|
if (value === true || value === false) {
|
@@ -125,11 +121,10 @@ function isBoolean(value) {
|
|
125
121
|
*
|
126
122
|
* @externalExample ../../example/types/is-5.mjs
|
127
123
|
* @param {*} value
|
128
|
-
* @
|
124
|
+
* @return {boolean}
|
129
125
|
* @license AGPLv3
|
130
126
|
* @since 1.0.0
|
131
127
|
* @copyright schukai GmbH
|
132
|
-
* @memberOf Monster.Types
|
133
128
|
*/
|
134
129
|
function isString(value) {
|
135
130
|
if (value === undefined || typeof value !== "string") {
|
@@ -145,11 +140,10 @@ function isString(value) {
|
|
145
140
|
*
|
146
141
|
* @externalExample ../../example/types/is-6.mjs
|
147
142
|
* @param {*} value
|
148
|
-
* @
|
143
|
+
* @return {boolean}
|
149
144
|
* @license AGPLv3
|
150
145
|
* @since 1.0.0
|
151
146
|
* @copyright schukai GmbH
|
152
|
-
* @memberOf Monster.Types
|
153
147
|
*/
|
154
148
|
function isObject(value) {
|
155
149
|
if (isArray(value)) return false;
|
@@ -170,11 +164,10 @@ function isObject(value) {
|
|
170
164
|
* @externalExample ../../example/types/is-7.mjs
|
171
165
|
* @param {*} value
|
172
166
|
* @param {*} instance
|
173
|
-
* @
|
167
|
+
* @return {boolean}
|
174
168
|
* @license AGPLv3
|
175
169
|
* @since 1.5.0
|
176
170
|
* @copyright schukai GmbH
|
177
|
-
* @memberOf Monster.Types
|
178
171
|
*/
|
179
172
|
function isInstance(value, instance) {
|
180
173
|
if (!isObject(value)) return false;
|
@@ -190,11 +183,10 @@ function isInstance(value, instance) {
|
|
190
183
|
*
|
191
184
|
* @externalExample ../../example/types/is-8.mjs
|
192
185
|
* @param {*} value
|
193
|
-
* @
|
186
|
+
* @return {boolean}
|
194
187
|
* @license AGPLv3
|
195
188
|
* @since 1.0.0
|
196
189
|
* @copyright schukai GmbH
|
197
|
-
* @memberOf Monster.Types
|
198
190
|
* @see https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
|
199
191
|
*/
|
200
192
|
function isArray(value) {
|
@@ -208,11 +200,10 @@ function isArray(value) {
|
|
208
200
|
*
|
209
201
|
* @externalExample ../../example/types/is-9.mjs
|
210
202
|
* @param {*} value
|
211
|
-
* @
|
203
|
+
* @return {boolean}
|
212
204
|
* @license AGPLv3
|
213
205
|
* @since 1.0.0
|
214
206
|
* @copyright schukai GmbH
|
215
|
-
* @memberOf Monster.Types
|
216
207
|
*/
|
217
208
|
function isFunction(value) {
|
218
209
|
if (isArray(value)) return false;
|
@@ -232,11 +223,10 @@ function isFunction(value) {
|
|
232
223
|
*
|
233
224
|
* @externalExample ../../example/types/is-10.mjs
|
234
225
|
* @param {*} value
|
235
|
-
* @
|
226
|
+
* @return {boolean}
|
236
227
|
* @license AGPLv3
|
237
228
|
* @since 1.4.0
|
238
229
|
* @copyright schukai GmbH
|
239
|
-
* @memberOf Monster.Types
|
240
230
|
*/
|
241
231
|
function isInteger(value) {
|
242
232
|
return Number.isInteger(value);
|
package/source/types/node.mjs
CHANGED
@@ -49,7 +49,7 @@ class NodeList extends Set {
|
|
49
49
|
|
50
50
|
/**
|
51
51
|
* This method is called by the `instanceof` operator.
|
52
|
-
* @
|
52
|
+
* @return {symbol}
|
53
53
|
* @since 2.1.0
|
54
54
|
*/
|
55
55
|
static get [instanceSymbol]() {
|
@@ -68,7 +68,7 @@ class NodeList extends Set {
|
|
68
68
|
|
69
69
|
/**
|
70
70
|
* @param {Node} node
|
71
|
-
* @
|
71
|
+
* @return {NodeList}
|
72
72
|
*/
|
73
73
|
remove(node) {
|
74
74
|
super.delete(validateInstance(node, Node));
|
@@ -77,14 +77,14 @@ class NodeList extends Set {
|
|
77
77
|
|
78
78
|
/**
|
79
79
|
* @param {Node} node
|
80
|
-
* @
|
80
|
+
* @return {boolean}
|
81
81
|
*/
|
82
82
|
has(node) {
|
83
83
|
return super.has(validateInstance(node, Node));
|
84
84
|
}
|
85
85
|
|
86
86
|
/**
|
87
|
-
* @
|
87
|
+
* @return {NodeList}
|
88
88
|
*/
|
89
89
|
clear() {
|
90
90
|
super.clear();
|
@@ -92,21 +92,21 @@ class NodeList extends Set {
|
|
92
92
|
}
|
93
93
|
|
94
94
|
/**
|
95
|
-
* @
|
95
|
+
* @return {NodeList}
|
96
96
|
*/
|
97
97
|
toArray() {
|
98
98
|
return Array.from(this);
|
99
99
|
}
|
100
100
|
|
101
101
|
/**
|
102
|
-
* @
|
102
|
+
* @return {NodeList}
|
103
103
|
*/
|
104
104
|
toJSON() {
|
105
105
|
return this.toArray();
|
106
106
|
}
|
107
107
|
|
108
108
|
/**
|
109
|
-
* @
|
109
|
+
* @return {NodeList}
|
110
110
|
*/
|
111
111
|
toString() {
|
112
112
|
const parts = [];
|
@@ -40,7 +40,7 @@ class ObservableQueue extends Queue {
|
|
40
40
|
|
41
41
|
/**
|
42
42
|
* This method is called by the `instanceof` operator.
|
43
|
-
* @
|
43
|
+
* @return {symbol}
|
44
44
|
*/
|
45
45
|
static get [instanceSymbol]() {
|
46
46
|
return Symbol.for("@schukai/monster/types/observablequeue");
|
@@ -50,7 +50,7 @@ class ObservableQueue extends Queue {
|
|
50
50
|
* Add a new element to the end of the queue.
|
51
51
|
*
|
52
52
|
* @param {*} value
|
53
|
-
* @
|
53
|
+
* @return {Queue}
|
54
54
|
*/
|
55
55
|
add(value) {
|
56
56
|
super.add(value);
|
@@ -61,7 +61,7 @@ class ObservableQueue extends Queue {
|
|
61
61
|
/**
|
62
62
|
* remove all entries
|
63
63
|
*
|
64
|
-
* @
|
64
|
+
* @return {Queue}
|
65
65
|
*/
|
66
66
|
clear() {
|
67
67
|
super.clear();
|
@@ -73,7 +73,7 @@ class ObservableQueue extends Queue {
|
|
73
73
|
* Attach a new observer
|
74
74
|
*
|
75
75
|
* @param {Observer} observer
|
76
|
-
* @
|
76
|
+
* @return {ProxyObserver}
|
77
77
|
*/
|
78
78
|
attachObserver(observer) {
|
79
79
|
this[internalSymbol].observers.attach(observer);
|
@@ -84,7 +84,7 @@ class ObservableQueue extends Queue {
|
|
84
84
|
* Detach a observer
|
85
85
|
*
|
86
86
|
* @param {Observer} observer
|
87
|
-
* @
|
87
|
+
* @return {ProxyObserver}
|
88
88
|
*/
|
89
89
|
detachObserver(observer) {
|
90
90
|
this[internalSymbol].observers.detach(observer);
|
@@ -94,7 +94,7 @@ class ObservableQueue extends Queue {
|
|
94
94
|
/**
|
95
95
|
* Notify all observer
|
96
96
|
*
|
97
|
-
* @
|
97
|
+
* @return {Promise}
|
98
98
|
*/
|
99
99
|
notifyObservers() {
|
100
100
|
return this[internalSymbol].observers.notify(this);
|
@@ -102,7 +102,7 @@ class ObservableQueue extends Queue {
|
|
102
102
|
|
103
103
|
/**
|
104
104
|
* @param {Observer} observer
|
105
|
-
* @
|
105
|
+
* @return {boolean}
|
106
106
|
*/
|
107
107
|
containsObserver(observer) {
|
108
108
|
return this[internalSymbol].observers.contains(observer);
|
@@ -77,7 +77,7 @@ class Observer extends Base {
|
|
77
77
|
|
78
78
|
/**
|
79
79
|
* This method is called by the `instanceof` operator.
|
80
|
-
* @
|
80
|
+
* @return {symbol}
|
81
81
|
* @since 2.1.0
|
82
82
|
*/
|
83
83
|
static get [instanceSymbol]() {
|
@@ -87,7 +87,7 @@ class Observer extends Base {
|
|
87
87
|
/**
|
88
88
|
*
|
89
89
|
* @param {string} tag
|
90
|
-
* @
|
90
|
+
* @return {Observer}
|
91
91
|
*/
|
92
92
|
addTag(tag) {
|
93
93
|
this.tags.add(tag);
|
@@ -97,7 +97,7 @@ class Observer extends Base {
|
|
97
97
|
/**
|
98
98
|
*
|
99
99
|
* @param {string} tag
|
100
|
-
* @
|
100
|
+
* @return {Observer}
|
101
101
|
*/
|
102
102
|
removeTag(tag) {
|
103
103
|
this.tags.remove(tag);
|
@@ -106,7 +106,7 @@ class Observer extends Base {
|
|
106
106
|
|
107
107
|
/**
|
108
108
|
*
|
109
|
-
* @
|
109
|
+
* @return {Array}
|
110
110
|
*/
|
111
111
|
getTags() {
|
112
112
|
return this.tags.entries();
|
@@ -115,7 +115,7 @@ class Observer extends Base {
|
|
115
115
|
/**
|
116
116
|
*
|
117
117
|
* @param {string} tag
|
118
|
-
* @
|
118
|
+
* @return {boolean}
|
119
119
|
*/
|
120
120
|
hasTag(tag) {
|
121
121
|
return this.tags.contains(tag);
|
@@ -124,7 +124,7 @@ class Observer extends Base {
|
|
124
124
|
/**
|
125
125
|
*
|
126
126
|
* @param {object} subject
|
127
|
-
* @
|
127
|
+
* @return {Promise}
|
128
128
|
*/
|
129
129
|
update(subject) {
|
130
130
|
const self = this;
|
@@ -57,7 +57,7 @@ class ProxyObserver extends Base {
|
|
57
57
|
|
58
58
|
/**
|
59
59
|
* This method is called by the `instanceof` operator.
|
60
|
-
* @
|
60
|
+
* @return {symbol}
|
61
61
|
* @since 2.1.0
|
62
62
|
*/
|
63
63
|
static get [instanceSymbol]() {
|
@@ -65,7 +65,7 @@ class ProxyObserver extends Base {
|
|
65
65
|
}
|
66
66
|
|
67
67
|
/**
|
68
|
-
* @
|
68
|
+
* @return {object}
|
69
69
|
*/
|
70
70
|
getSubject() {
|
71
71
|
return this.subject;
|
@@ -93,7 +93,7 @@ class ProxyObserver extends Base {
|
|
93
93
|
*
|
94
94
|
* Changes to this object are not noticed by the observers, so you can make a large number of changes and inform the observers later.
|
95
95
|
*
|
96
|
-
* @
|
96
|
+
* @return {object}
|
97
97
|
*/
|
98
98
|
getRealSubject() {
|
99
99
|
return this.realSubject;
|
@@ -103,7 +103,7 @@ class ProxyObserver extends Base {
|
|
103
103
|
* attach a new observer
|
104
104
|
*
|
105
105
|
* @param {Observer} observer
|
106
|
-
* @
|
106
|
+
* @return {ProxyObserver}
|
107
107
|
*/
|
108
108
|
attachObserver(observer) {
|
109
109
|
this.observers.attach(observer);
|
@@ -114,7 +114,7 @@ class ProxyObserver extends Base {
|
|
114
114
|
* detach a observer
|
115
115
|
*
|
116
116
|
* @param {Observer} observer
|
117
|
-
* @
|
117
|
+
* @return {ProxyObserver}
|
118
118
|
*/
|
119
119
|
detachObserver(observer) {
|
120
120
|
this.observers.detach(observer);
|
@@ -124,7 +124,7 @@ class ProxyObserver extends Base {
|
|
124
124
|
/**
|
125
125
|
* notify all observer
|
126
126
|
*
|
127
|
-
* @
|
127
|
+
* @return {Promise}
|
128
128
|
*/
|
129
129
|
notifyObservers() {
|
130
130
|
return this.observers.notify(this);
|
@@ -132,7 +132,7 @@ class ProxyObserver extends Base {
|
|
132
132
|
|
133
133
|
/**
|
134
134
|
* @param {Observer} observer
|
135
|
-
* @
|
135
|
+
* @return {boolean}
|
136
136
|
*/
|
137
137
|
containsObserver(observer) {
|
138
138
|
return this.observers.contains(observer);
|
@@ -141,7 +141,7 @@ class ProxyObserver extends Base {
|
|
141
141
|
|
142
142
|
/**
|
143
143
|
*
|
144
|
-
* @
|
144
|
+
* @return {{defineProperty: (function(*=, *=, *=): *), setPrototypeOf: (function(*, *=): boolean), set: (function(*, *, *, *): boolean), get: ((function(*=, *=, *=): (undefined))|*), deleteProperty: ((function(*, *): (boolean))|*)}}
|
145
145
|
* @private
|
146
146
|
* @see {@link https://gitlab.schukai.com/-/snippets/49}
|
147
147
|
*/
|
package/source/types/queue.mjs
CHANGED
@@ -41,7 +41,7 @@ class Queue extends Base {
|
|
41
41
|
|
42
42
|
/**
|
43
43
|
* This method is called by the `instanceof` operator.
|
44
|
-
* @
|
44
|
+
* @return {symbol}
|
45
45
|
* @since 2.1.0
|
46
46
|
*/
|
47
47
|
static get [instanceSymbol]() {
|
@@ -72,7 +72,7 @@ class Queue extends Base {
|
|
72
72
|
* Add a new element to the end of the queue.
|
73
73
|
*
|
74
74
|
* @param {*} value
|
75
|
-
* @
|
75
|
+
* @return {Queue}
|
76
76
|
*/
|
77
77
|
add(value) {
|
78
78
|
this.data.push(value);
|
@@ -82,7 +82,7 @@ class Queue extends Base {
|
|
82
82
|
/**
|
83
83
|
* remove all entries
|
84
84
|
*
|
85
|
-
* @
|
85
|
+
* @return {Queue}
|
86
86
|
*/
|
87
87
|
clear() {
|
88
88
|
this.data = [];
|
package/source/types/stack.mjs
CHANGED
@@ -34,7 +34,7 @@ class Stack extends Base {
|
|
34
34
|
|
35
35
|
/**
|
36
36
|
* This method is called by the `instanceof` operator.
|
37
|
-
* @
|
37
|
+
* @return {symbol}
|
38
38
|
* @since 2.1.0
|
39
39
|
*/
|
40
40
|
static get [instanceSymbol]() {
|
@@ -65,7 +65,7 @@ class Stack extends Base {
|
|
65
65
|
* pushes an item onto the top of this stack.
|
66
66
|
*
|
67
67
|
* @param {*} value
|
68
|
-
* @
|
68
|
+
* @return {Queue}
|
69
69
|
*/
|
70
70
|
push(value) {
|
71
71
|
this.data.push(value);
|
@@ -75,7 +75,7 @@ class Stack extends Base {
|
|
75
75
|
/**
|
76
76
|
* remove all entries
|
77
77
|
*
|
78
|
-
* @
|
78
|
+
* @return {Queue}
|
79
79
|
*/
|
80
80
|
clear() {
|
81
81
|
this.data = [];
|
@@ -46,7 +46,7 @@ class TokenList extends Base {
|
|
46
46
|
/**
|
47
47
|
* Iterator protocol
|
48
48
|
*
|
49
|
-
* @
|
49
|
+
* @return {Symbol.iterator}
|
50
50
|
*/
|
51
51
|
getIterator() {
|
52
52
|
return this[Symbol.iterator]();
|
@@ -55,7 +55,7 @@ class TokenList extends Base {
|
|
55
55
|
/**
|
56
56
|
* Iterator
|
57
57
|
*
|
58
|
-
* @
|
58
|
+
* @return {{next: ((function(): ({value: *, done: boolean}))|*)}}
|
59
59
|
*/
|
60
60
|
[Symbol.iterator]() {
|
61
61
|
// Use a new index for each iterator. This makes multiple
|
@@ -80,7 +80,7 @@ class TokenList extends Base {
|
|
80
80
|
*
|
81
81
|
* @externalExample ../../example/types/tokenlist-2.mjs
|
82
82
|
* @param {array|string|iteratable} value
|
83
|
-
* @
|
83
|
+
* @return {boolean}
|
84
84
|
*/
|
85
85
|
contains(value) {
|
86
86
|
if (isString(value)) {
|
@@ -111,7 +111,7 @@ class TokenList extends Base {
|
|
111
111
|
*
|
112
112
|
* @externalExample ../../example/types/tokenlist-3.mjs
|
113
113
|
* @param {array|string|iteratable} value
|
114
|
-
* @
|
114
|
+
* @return {TokenList}
|
115
115
|
* @throws {TypeError} unsupported value
|
116
116
|
*/
|
117
117
|
add(value) {
|
@@ -134,7 +134,7 @@ class TokenList extends Base {
|
|
134
134
|
/**
|
135
135
|
* remove all tokens
|
136
136
|
*
|
137
|
-
* @
|
137
|
+
* @return {TokenList}
|
138
138
|
*/
|
139
139
|
clear() {
|
140
140
|
this.tokens.clear();
|
@@ -146,7 +146,7 @@ class TokenList extends Base {
|
|
146
146
|
*
|
147
147
|
* @externalExample ../../example/types/tokenlist-4.mjs
|
148
148
|
* @param {array|string|iteratable} value
|
149
|
-
* @
|
149
|
+
* @return {TokenList}
|
150
150
|
* @throws {TypeError} unsupported value
|
151
151
|
*/
|
152
152
|
remove(value) {
|
@@ -174,7 +174,7 @@ class TokenList extends Base {
|
|
174
174
|
*
|
175
175
|
* @param {string} token
|
176
176
|
* @param {string} newToken
|
177
|
-
* @
|
177
|
+
* @return {TokenList}
|
178
178
|
*/
|
179
179
|
replace(token, newToken) {
|
180
180
|
validateString(token);
|
@@ -199,7 +199,7 @@ class TokenList extends Base {
|
|
199
199
|
*
|
200
200
|
* @externalExample ../../example/types/tokenlist-5.mjs
|
201
201
|
* @param {array|string|iteratable} value
|
202
|
-
* @
|
202
|
+
* @return {boolean}
|
203
203
|
* @throws {TypeError} unsupported value
|
204
204
|
*/
|
205
205
|
toggle(value) {
|
@@ -221,7 +221,7 @@ class TokenList extends Base {
|
|
221
221
|
/**
|
222
222
|
* returns an array with all tokens
|
223
223
|
*
|
224
|
-
* @
|
224
|
+
* @return {array}
|
225
225
|
*/
|
226
226
|
entries() {
|
227
227
|
return Array.from(this.tokens);
|
@@ -231,7 +231,7 @@ class TokenList extends Base {
|
|
231
231
|
* executes the provided function with each value of the set
|
232
232
|
*
|
233
233
|
* @param {function} callback
|
234
|
-
* @
|
234
|
+
* @return {TokenList}
|
235
235
|
*/
|
236
236
|
forEach(callback) {
|
237
237
|
validateFunction(callback);
|
@@ -242,7 +242,7 @@ class TokenList extends Base {
|
|
242
242
|
/**
|
243
243
|
* returns the individual tokens separated by a blank character
|
244
244
|
*
|
245
|
-
* @
|
245
|
+
* @return {string}
|
246
246
|
*/
|
247
247
|
toString() {
|
248
248
|
return this.entries().join(" ");
|
@@ -252,7 +252,7 @@ class TokenList extends Base {
|
|
252
252
|
/**
|
253
253
|
* @private
|
254
254
|
* @param token
|
255
|
-
* @
|
255
|
+
* @return {toggleValue}
|
256
256
|
* @throws {Error} must be called with TokenList.call
|
257
257
|
*/
|
258
258
|
function toggleValue(token) {
|
@@ -41,7 +41,7 @@ class UniqueQueue extends Queue {
|
|
41
41
|
* Add a new element to the end of the queue.
|
42
42
|
*
|
43
43
|
* @param {object} value
|
44
|
-
* @
|
44
|
+
* @return {Queue}
|
45
45
|
* @throws {TypeError} value is not a object
|
46
46
|
*/
|
47
47
|
add(value) {
|
@@ -58,7 +58,7 @@ class UniqueQueue extends Queue {
|
|
58
58
|
/**
|
59
59
|
* remove all entries
|
60
60
|
*
|
61
|
-
* @
|
61
|
+
* @return {Queue}
|
62
62
|
*/
|
63
63
|
clear() {
|
64
64
|
super.clear();
|
package/source/types/version.mjs
CHANGED
@@ -82,7 +82,7 @@ class Version extends Base {
|
|
82
82
|
|
83
83
|
/**
|
84
84
|
* This method is called by the `instanceof` operator.
|
85
|
-
* @
|
85
|
+
* @return {symbol}
|
86
86
|
* @since 2.1.0
|
87
87
|
*/
|
88
88
|
static get [instanceSymbol]() {
|
@@ -91,7 +91,7 @@ class Version extends Base {
|
|
91
91
|
|
92
92
|
/**
|
93
93
|
*
|
94
|
-
* @
|
94
|
+
* @return {string}
|
95
95
|
*/
|
96
96
|
toString() {
|
97
97
|
return `${this.major}.${this.minor}.${this.patch}`;
|
@@ -102,7 +102,7 @@ class Version extends Base {
|
|
102
102
|
* than the compared version
|
103
103
|
*
|
104
104
|
* @param {string|Version} version Version to compare
|
105
|
-
* @
|
105
|
+
* @return {number}
|
106
106
|
*/
|
107
107
|
compareTo(version) {
|
108
108
|
if (version instanceof Version) {
|
@@ -144,7 +144,7 @@ let monsterVersion;
|
|
144
144
|
/**
|
145
145
|
* Version of monster
|
146
146
|
*
|
147
|
-
* @
|
147
|
+
* @return {Version}
|
148
148
|
* @license AGPLv3
|
149
149
|
* @since 1.0.0
|
150
150
|
* @copyright schukai GmbH
|
package/source/util/clone.mjs
CHANGED
@@ -29,7 +29,7 @@ export { clone };
|
|
29
29
|
* If an object has a method `getClone()`, this method is used to create the clone.
|
30
30
|
*
|
31
31
|
* @param {*} obj object to be cloned
|
32
|
-
* @
|
32
|
+
* @return {*}
|
33
33
|
* @license AGPLv3
|
34
34
|
* @since 1.0.0
|
35
35
|
* @memberOf Monster.Util
|
@@ -106,7 +106,7 @@ function clone(obj) {
|
|
106
106
|
/**
|
107
107
|
*
|
108
108
|
* @param {object} obj
|
109
|
-
* @
|
109
|
+
* @return {object}
|
110
110
|
* @private
|
111
111
|
*/
|
112
112
|
function cloneObject(obj) {
|
@@ -38,10 +38,9 @@ export { Comparator };
|
|
38
38
|
* }).equal({v: 2}, {v: 2}); // ↦ true
|
39
39
|
* ```
|
40
40
|
*
|
41
|
-
* @
|
41
|
+
* @example /example/comparator/simple/ Simple example
|
42
42
|
* @license AGPLv3
|
43
43
|
* @since 1.3.0
|
44
|
-
* @memberOf Monster.Util
|
45
44
|
*/
|
46
45
|
class Comparator extends Base {
|
47
46
|
/**
|
@@ -21,13 +21,13 @@ import { validateFunction, validateInteger } from "../types/validate.mjs";
|
|
21
21
|
export { DeadMansSwitch };
|
22
22
|
|
23
23
|
/**
|
24
|
-
* The dead man's switch allows
|
24
|
+
* The dead man's switch allows setting a timer which can be reset again
|
25
|
+
* and again within a defined period of time.
|
25
26
|
*
|
26
|
-
* @
|
27
|
+
* @example /example/util/deadmansswitch/simple/ Simple example
|
27
28
|
* @copyright schukai GmbH
|
28
29
|
* @license AGPLv3
|
29
30
|
* @since 1.29.0
|
30
|
-
* @memberOf Monster.Util
|
31
31
|
* @summary Class to be able to execute function chains
|
32
32
|
*/
|
33
33
|
class DeadMansSwitch extends Base {
|
@@ -46,8 +46,10 @@ class DeadMansSwitch extends Base {
|
|
46
46
|
}
|
47
47
|
|
48
48
|
/**
|
49
|
-
*
|
50
|
-
* @
|
49
|
+
* @param delay
|
50
|
+
* @returns {DeadMansSwitch}
|
51
|
+
* @throws {Error} has already run
|
52
|
+
* @throws {Error} unsupported argument
|
51
53
|
*/
|
52
54
|
touch(delay) {
|
53
55
|
if (this[internalSymbol]["isAlreadyRun"] === true) {
|
package/source/util/freeze.mjs
CHANGED
@@ -34,11 +34,11 @@ export { Processing };
|
|
34
34
|
*
|
35
35
|
* The result of `run()` is a promise.
|
36
36
|
*
|
37
|
-
* @
|
37
|
+
* @example /examples/libraries/util/processing/simple/ A simple example
|
38
|
+
*
|
38
39
|
* @copyright schukai GmbH
|
39
40
|
* @license AGPLv3
|
40
41
|
* @since 1.21.0
|
41
|
-
* @memberOf Monster.Util
|
42
42
|
* @summary Class to be able to execute function chains
|
43
43
|
*/
|
44
44
|
class Processing extends Base {
|