@schukai/monster 1.25.0 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/CHANGELOG +43 -0
  2. package/README.md +4 -4
  3. package/dist/modules/constants.js +1 -1
  4. package/dist/modules/constraints/abstract.js +1 -1
  5. package/dist/modules/constraints/abstractoperator.js +1 -1
  6. package/dist/modules/constraints/andoperator.js +1 -1
  7. package/dist/modules/constraints/invalid.js +1 -1
  8. package/dist/modules/constraints/isarray.js +1 -1
  9. package/dist/modules/constraints/isobject.js +1 -1
  10. package/dist/modules/constraints/namespace.js +1 -1
  11. package/dist/modules/constraints/oroperator.js +1 -1
  12. package/dist/modules/constraints/valid.js +1 -1
  13. package/dist/modules/data/buildmap.js +2 -2
  14. package/dist/modules/data/buildtree.js +2 -0
  15. package/dist/modules/data/datasource/namespace.js +1 -1
  16. package/dist/modules/data/datasource/restapi/writeerror.js +1 -1
  17. package/dist/modules/data/datasource/restapi.js +1 -1
  18. package/dist/modules/data/datasource/storage/localstorage.js +1 -1
  19. package/dist/modules/data/datasource/storage/namespace.js +1 -1
  20. package/dist/modules/data/datasource/storage/sessionstorage.js +1 -1
  21. package/dist/modules/data/datasource/storage.js +1 -1
  22. package/dist/modules/data/datasource.js +1 -1
  23. package/dist/modules/data/diff.js +1 -1
  24. package/dist/modules/data/extend.js +1 -1
  25. package/dist/modules/data/namespace.js +1 -1
  26. package/dist/modules/data/pathfinder.js +1 -1
  27. package/dist/modules/data/pipe.js +1 -1
  28. package/dist/modules/data/transformer.js +1 -1
  29. package/dist/modules/dom/assembler.js +1 -1
  30. package/dist/modules/dom/attributes.js +2 -2
  31. package/dist/modules/dom/constants.js +2 -2
  32. package/dist/modules/dom/customcontrol.js +1 -1
  33. package/dist/modules/dom/customelement.js +1 -1
  34. package/dist/modules/dom/events.js +1 -1
  35. package/dist/modules/dom/focusmanager.js +1 -1
  36. package/dist/modules/dom/locale.js +1 -1
  37. package/dist/modules/dom/namespace.js +1 -1
  38. package/dist/modules/dom/resource/data.js +1 -1
  39. package/dist/modules/dom/resource/link/stylesheet.js +1 -1
  40. package/dist/modules/dom/resource/link.js +1 -1
  41. package/dist/modules/dom/resource/script.js +1 -1
  42. package/dist/modules/dom/resource.js +1 -1
  43. package/dist/modules/dom/resourcemanager.js +1 -1
  44. package/dist/modules/dom/template.js +2 -2
  45. package/dist/modules/dom/theme.js +1 -1
  46. package/dist/modules/dom/updater.js +2 -2
  47. package/dist/modules/dom/util.js +1 -1
  48. package/dist/modules/dom/worker/factory.js +1 -1
  49. package/dist/modules/i18n/formatter.js +2 -0
  50. package/dist/modules/i18n/locale.js +1 -1
  51. package/dist/modules/i18n/namespace.js +1 -1
  52. package/dist/modules/i18n/provider.js +1 -1
  53. package/dist/modules/i18n/providers/fetch.js +1 -1
  54. package/dist/modules/i18n/providers/namespace.js +1 -1
  55. package/dist/modules/i18n/translations.js +1 -1
  56. package/dist/modules/logging/handler/console.js +1 -1
  57. package/dist/modules/logging/handler/namespace.js +1 -1
  58. package/dist/modules/logging/handler.js +1 -1
  59. package/dist/modules/logging/logentry.js +1 -1
  60. package/dist/modules/logging/logger.js +1 -1
  61. package/dist/modules/logging/namespace.js +1 -1
  62. package/dist/modules/math/namespace.js +1 -1
  63. package/dist/modules/math/random.js +1 -1
  64. package/dist/modules/monster.js +1 -1
  65. package/dist/modules/namespace.js +1 -1
  66. package/dist/modules/text/formatter.js +2 -2
  67. package/dist/modules/text/namespace.js +1 -1
  68. package/dist/modules/types/base.js +1 -1
  69. package/dist/modules/types/basewithoptions.js +1 -1
  70. package/dist/modules/types/binary.js +1 -1
  71. package/dist/modules/types/dataurl.js +1 -1
  72. package/dist/modules/types/global.js +1 -1
  73. package/dist/modules/types/id.js +1 -1
  74. package/dist/modules/types/is.js +2 -2
  75. package/dist/modules/types/mediatype.js +1 -1
  76. package/dist/modules/types/namespace.js +1 -1
  77. package/dist/modules/types/node.js +2 -0
  78. package/dist/modules/types/nodelist.js +2 -0
  79. package/dist/modules/types/noderecursiveiterator.js +2 -0
  80. package/dist/modules/types/observer.js +1 -1
  81. package/dist/modules/types/observerlist.js +1 -1
  82. package/dist/modules/types/proxyobserver.js +1 -1
  83. package/dist/modules/types/queue.js +1 -1
  84. package/dist/modules/types/randomid.js +1 -1
  85. package/dist/modules/types/regex.js +2 -0
  86. package/dist/modules/types/stack.js +1 -1
  87. package/dist/modules/types/tokenlist.js +1 -1
  88. package/dist/modules/types/typeof.js +1 -1
  89. package/dist/modules/types/uniquequeue.js +1 -1
  90. package/dist/modules/types/uuid.js +1 -1
  91. package/dist/modules/types/validate.js +1 -1
  92. package/dist/modules/types/version.js +2 -2
  93. package/dist/modules/util/clone.js +1 -1
  94. package/dist/modules/util/comparator.js +1 -1
  95. package/dist/modules/util/freeze.js +1 -1
  96. package/dist/modules/util/namespace.js +1 -1
  97. package/dist/modules/util/processing.js +1 -1
  98. package/dist/modules/util/trimspaces.js +1 -1
  99. package/dist/monster.dev.js +1181 -708
  100. package/dist/monster.dev.js.map +1 -1
  101. package/dist/monster.js +2 -2
  102. package/package.json +13 -2
  103. package/source/constraints/abstract.js +5 -0
  104. package/source/constraints/abstractoperator.js +5 -0
  105. package/source/constraints/andoperator.js +10 -5
  106. package/source/constraints/invalid.js +8 -3
  107. package/source/constraints/isarray.js +9 -4
  108. package/source/constraints/isobject.js +8 -3
  109. package/source/constraints/oroperator.js +10 -5
  110. package/source/constraints/valid.js +8 -3
  111. package/source/data/buildmap.js +27 -13
  112. package/source/data/buildtree.js +129 -0
  113. package/source/data/datasource/restapi.js +3 -3
  114. package/source/data/datasource/storage/localstorage.js +2 -2
  115. package/source/data/datasource/storage/sessionstorage.js +2 -2
  116. package/source/data/datasource/storage.js +3 -3
  117. package/source/data/datasource.js +3 -3
  118. package/source/data/diff.js +3 -3
  119. package/source/data/extend.js +2 -2
  120. package/source/data/pathfinder.js +4 -4
  121. package/source/data/pipe.js +3 -3
  122. package/source/data/transformer.js +3 -3
  123. package/source/dom/assembler.js +2 -2
  124. package/source/dom/attributes.js +111 -28
  125. package/source/dom/constants.js +17 -1
  126. package/source/dom/customcontrol.js +1 -1
  127. package/source/dom/customelement.js +1 -1
  128. package/source/dom/events.js +6 -7
  129. package/source/dom/focusmanager.js +6 -7
  130. package/source/dom/locale.js +8 -4
  131. package/source/dom/resource/data.js +2 -2
  132. package/source/dom/resource/link/stylesheet.js +2 -2
  133. package/source/dom/resource/link.js +2 -2
  134. package/source/dom/resource/script.js +2 -2
  135. package/source/dom/resource.js +2 -2
  136. package/source/dom/resourcemanager.js +2 -2
  137. package/source/dom/template.js +55 -15
  138. package/source/dom/theme.js +3 -3
  139. package/source/dom/updater.js +158 -98
  140. package/source/dom/util.js +6 -6
  141. package/source/dom/worker/factory.js +2 -2
  142. package/source/i18n/formatter.js +140 -0
  143. package/source/i18n/locale.js +6 -4
  144. package/source/i18n/provider.js +2 -2
  145. package/source/i18n/providers/fetch.js +18 -3
  146. package/source/i18n/translations.js +18 -9
  147. package/source/logging/handler/console.js +2 -2
  148. package/source/logging/handler.js +2 -2
  149. package/source/logging/logentry.js +2 -2
  150. package/source/logging/logger.js +2 -2
  151. package/source/math/random.js +2 -2
  152. package/source/namespace.js +1 -1
  153. package/source/text/formatter.js +190 -48
  154. package/source/types/base.js +2 -2
  155. package/source/types/basewithoptions.js +2 -2
  156. package/source/types/binary.js +4 -4
  157. package/source/types/dataurl.js +4 -4
  158. package/source/types/global.js +4 -4
  159. package/source/types/id.js +6 -3
  160. package/source/types/is.js +100 -82
  161. package/source/types/mediatype.js +4 -4
  162. package/source/types/node.js +210 -0
  163. package/source/types/nodelist.js +129 -0
  164. package/source/types/noderecursiveiterator.js +148 -0
  165. package/source/types/observer.js +3 -3
  166. package/source/types/observerlist.js +2 -2
  167. package/source/types/proxyobserver.js +5 -5
  168. package/source/types/queue.js +4 -4
  169. package/source/types/randomid.js +2 -2
  170. package/source/types/regex.js +49 -0
  171. package/source/types/stack.js +2 -2
  172. package/source/types/tokenlist.js +2 -2
  173. package/source/types/typeof.js +3 -3
  174. package/source/types/uniquequeue.js +2 -2
  175. package/source/types/uuid.js +2 -2
  176. package/source/types/validate.js +20 -20
  177. package/source/types/version.js +6 -6
  178. package/source/util/clone.js +2 -2
  179. package/source/util/comparator.js +3 -3
  180. package/source/util/freeze.js +2 -2
  181. package/source/util/processing.js +3 -3
  182. package/source/util/trimspaces.js +2 -2
  183. package/test/cases/data/buildtree.js +212 -0
  184. package/test/cases/dom/attributes.js +46 -19
  185. package/test/cases/dom/resource/link/stylesheet.js +1 -1
  186. package/test/cases/dom/template.js +72 -14
  187. package/test/cases/dom/updater.js +102 -75
  188. package/test/cases/i18n/formatter.js +66 -0
  189. package/test/cases/monster.js +1 -1
  190. package/test/cases/text/formatter.js +36 -5
  191. package/test/cases/types/node.js +252 -0
  192. package/test/cases/types/nodelist.js +71 -0
  193. package/test/cases/types/noderecursiveiterator.js +75 -0
  194. package/test/cases/types/regex.js +32 -0
  195. package/test/util/jsdom.js +0 -1
  196. package/test/web/import.js +6 -0
  197. package/test/web/monster-dev.html +3 -3
  198. package/test/web/monster.html +2 -2
  199. package/test/web/test.html +3 -3
  200. package/test/web/tests.js +3 -3
@@ -0,0 +1,252 @@
1
+ 'use strict';
2
+
3
+ import {expect} from "chai"
4
+ import {Node} from "../../../source/types/node.js";
5
+ import {NodeList} from "../../../source/types/nodelist.js";
6
+ import {NodeRecursiveIterator} from "../../../source/types/noderecursiveiterator.js";
7
+
8
+ describe('NodeList', function () {
9
+ describe('#constructor', function () {
10
+ it('should create an empty NodeList', function () {
11
+ let nodeList = new NodeList();
12
+
13
+ expect(nodeList.size).to.equal(0);
14
+ });
15
+
16
+ it('should create a NodeList from an array', function () {
17
+ let nodeList = new NodeList([
18
+ new Node('div'),
19
+ new Node('div'),
20
+ new Node('div')
21
+ ]);
22
+
23
+ expect(nodeList.size).to.equal(3);
24
+ });
25
+
26
+ it('should create a NodeList from a NodeList', function () {
27
+ let nodeList = new NodeList([
28
+ new Node('div'),
29
+ new Node('div'),
30
+ new Node('div')
31
+ ]);
32
+
33
+ let nodeList2 = new NodeList(nodeList);
34
+
35
+ expect(nodeList2.size).to.equal(3);
36
+ });
37
+ });
38
+
39
+ it('create NodeList', function () {
40
+ expect(new NodeList()).is.instanceof(NodeList);
41
+ })
42
+
43
+ it('add Node', function () {
44
+ expect(new NodeList().add(new Node())).to.be.instanceof(NodeList);
45
+ })
46
+
47
+ it('remove Node', function () {
48
+ expect(new NodeList().remove(new Node())).to.be.instanceof(NodeList);
49
+ })
50
+
51
+ it('has unknown Node', function () {
52
+ expect(new NodeList().has(new Node)).to.be.false;
53
+ })
54
+
55
+ it('has added Node', function () {
56
+ const n = new Node;
57
+ expect(new NodeList().add(n).has(n)).to.be.true;
58
+ })
59
+
60
+ it('throw exception', function () {
61
+ expect(() => new NodeList().add(1)).to.throw(Error);
62
+ })
63
+
64
+ it('check level', function () {
65
+
66
+ const root = new Node('root');
67
+
68
+ const n1 = new Node('n1');
69
+ const n2 = new Node('n2');
70
+ const n3 = new Node('n3');
71
+ const n4 = new Node('n4');
72
+
73
+ const n11 = new Node('n11');
74
+ const n12 = new Node('n12');
75
+ const n13 = new Node('n13');
76
+
77
+ const n21 = new Node('n21');
78
+ const n22 = new Node('n22');
79
+ const n23 = new Node('n23');
80
+
81
+ const n41 = new Node('n41');
82
+ const n42 = new Node('n42');
83
+
84
+ const n411 = new Node('n411');
85
+ const n412 = new Node('n412');
86
+ const n413 = new Node('n413');
87
+
88
+ const n4121 = new Node('n4121');
89
+
90
+ root.appendChild(n1).appendChild(n2).appendChild(n3).appendChild(n4);
91
+ n1.appendChild(n11).appendChild(n12).appendChild(n13);
92
+ n2.appendChild(n21).appendChild(n22).appendChild(n23);
93
+ n4.appendChild(n41).appendChild(n42);
94
+ n41.appendChild(n411).appendChild(n412).appendChild(n413);
95
+ n412.appendChild(n4121);
96
+
97
+ let iterator = new NodeRecursiveIterator(root);
98
+
99
+ let result = [];
100
+ for (const n of iterator) {
101
+ expect(n).to.be.an.instanceof(Node);
102
+ result.push(n.value + ":" + n.level);
103
+ }
104
+
105
+
106
+ expect(result).to.deep.equal([
107
+ 'root:0',
108
+ 'n1:1',
109
+ 'n11:2',
110
+ 'n12:2',
111
+ 'n13:2',
112
+ 'n2:1',
113
+ 'n21:2',
114
+ 'n22:2',
115
+ 'n23:2',
116
+ 'n3:1',
117
+ 'n4:1',
118
+ 'n41:2',
119
+ 'n411:3',
120
+ 'n412:3',
121
+ 'n4121:4',
122
+ 'n413:3',
123
+ 'n42:2'
124
+
125
+ ]);
126
+
127
+ n4121.appendChild(new Node('n41211'));
128
+
129
+ iterator = new NodeRecursiveIterator(root);
130
+ result = [];
131
+ for (const n of iterator) {
132
+ expect(n).to.be.an.instanceof(Node);
133
+ result.push(n.value + ":" + n.level);
134
+ }
135
+
136
+ expect(result).to.deep.equal([
137
+ 'root:0',
138
+ 'n1:1',
139
+ 'n11:2',
140
+ 'n12:2',
141
+ 'n13:2',
142
+ 'n2:1',
143
+ 'n21:2',
144
+ 'n22:2',
145
+ 'n23:2',
146
+ 'n3:1',
147
+ 'n4:1',
148
+ 'n41:2',
149
+ 'n411:3',
150
+ 'n412:3',
151
+ 'n4121:4',
152
+ 'n41211:5',
153
+ 'n413:3',
154
+ 'n42:2'
155
+
156
+ ]);
157
+
158
+
159
+ const bb = new Node('bb') // big bang
160
+
161
+ bb.appendChild(root);
162
+ iterator = new NodeRecursiveIterator(bb);
163
+
164
+ result = [];
165
+ for (const n of iterator) {
166
+ expect(n).to.be.an.instanceof(Node);
167
+ result.push(n.value + ":" + n.level);
168
+ }
169
+
170
+ expect(result).to.deep.equal([
171
+ 'bb:0',
172
+ 'root:1',
173
+ 'n1:2',
174
+ 'n11:3',
175
+ 'n12:3',
176
+ 'n13:3',
177
+ 'n2:2',
178
+ 'n21:3',
179
+ 'n22:3',
180
+ 'n23:3',
181
+ 'n3:2',
182
+ 'n4:2',
183
+ 'n41:3',
184
+ 'n411:4',
185
+ 'n412:4',
186
+ 'n4121:5',
187
+ 'n41211:6',
188
+ 'n413:4',
189
+ 'n42:3'
190
+
191
+ ]);
192
+
193
+ })
194
+
195
+ describe('Levels', function () {
196
+
197
+ it('n2 should level 2', function () {
198
+
199
+ const n0 = new Node('abc');
200
+
201
+ const n1 = new Node('def');
202
+ n0.appendChild(n1)
203
+
204
+ const n2 = new Node('ghi');
205
+ n1.appendChild(n2);
206
+
207
+ const n3 = new Node('jkl');
208
+ n2.appendChild(n3);
209
+
210
+ expect(n0.level).to.be.equal(0);
211
+ expect(n1.level).to.be.equal(1);
212
+ expect(n2.level).to.be.equal(2);
213
+ expect(n3.level).to.be.equal(3);
214
+
215
+ });
216
+ });
217
+
218
+
219
+ describe('toString()', function () {
220
+
221
+ it('should output empty string', function () {
222
+ const node = new Node();
223
+ expect(node.toString()).is.equal('');
224
+ });
225
+
226
+ it('should output string', function () {
227
+ const n0 = new Node('abc');
228
+
229
+ const n1 = new Node('def');
230
+ n0.appendChild(n1)
231
+
232
+ const n11 = new Node('ghi');
233
+ n0.appendChild(n11)
234
+
235
+ const n2 = new Node('jkl');
236
+ n1.appendChild(n2);
237
+
238
+ const n3 = new Node('mno');
239
+ n1.appendChild(n3);
240
+
241
+ const n4 = new Node('pqr');
242
+ n2.appendChild(n4);
243
+
244
+ expect(n2.level).to.be.equal(2)
245
+
246
+ console.log(n0.toString());
247
+ // expect(n0.toString()).is.equal('');
248
+ });
249
+ });
250
+
251
+
252
+ });
@@ -0,0 +1,71 @@
1
+ 'use strict';
2
+
3
+ import {expect} from "chai"
4
+ import {Node} from "../../../source/types/node.js";
5
+ import {NodeList} from "../../../source/types/nodelist.js";
6
+
7
+ describe('NodeList', function () {
8
+ describe('#constructor', function () {
9
+ it('should create an empty NodeList', function () {
10
+ let nodeList = new NodeList();
11
+
12
+ expect(nodeList.size).to.equal(0);
13
+ });
14
+
15
+ it('should create a NodeList from an array', function () {
16
+ let nodeList = new NodeList([
17
+ new Node('div'),
18
+ new Node('div'),
19
+ new Node('div')
20
+ ]);
21
+
22
+ expect(nodeList.size).to.equal(3);
23
+ });
24
+
25
+ it('should create a NodeList from a NodeList', function () {
26
+ let nodeList = new NodeList([
27
+ new Node('div'),
28
+ new Node('div'),
29
+ new Node('div')
30
+ ]);
31
+
32
+ let nodeList2 = new NodeList(nodeList);
33
+
34
+ expect(nodeList2.size).to.equal(3);
35
+ });
36
+
37
+ });
38
+
39
+
40
+ it('create NodeList', function () {
41
+ expect(new NodeList()).is.instanceof(NodeList);
42
+ })
43
+
44
+ it('add Node', function () {
45
+ expect(new NodeList().add(new Node())).to.be.instanceof(NodeList);
46
+ })
47
+
48
+ it('remove Node', function () {
49
+ expect(new NodeList().remove(new Node())).to.be.instanceof(NodeList);
50
+ })
51
+
52
+ it('has unknown Node', function () {
53
+ expect(new NodeList().has(new Node)).to.be.false;
54
+ })
55
+
56
+ it('has added Node', function () {
57
+ const n = new Node;
58
+ expect(new NodeList().add(n).has(n)).to.be.true;
59
+ })
60
+
61
+ it('toString', function () {
62
+ const n = new Node;
63
+ expect(new NodeList().add(new Node('a').appendChild(new Node('b'))).toString()).to.be.equal('a\n └b');
64
+ })
65
+
66
+ it('throw exception', function () {
67
+ expect(() => new NodeList().add(1)).to.throw(Error);
68
+ })
69
+
70
+
71
+ });
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+
3
+ import {expect} from "chai"
4
+ import {Node} from "../../../source/types/node.js";
5
+ import {NodeList} from "../../../source/types/nodelist.js";
6
+ import {NodeRecursiveIterator} from "../../../source/types/noderecursiveiterator.js";
7
+
8
+ describe('NodeRecursiveIterator', function () {
9
+
10
+ it('should throw exeption', function () {
11
+ expect(() => new NodeRecursiveIterator()).to.throw(Error)
12
+ });
13
+ it('should be a function', function () {
14
+ expect(NodeRecursiveIterator).to.be.a('function');
15
+ });
16
+
17
+ it('should be a constructor', function () {
18
+ expect(new NodeRecursiveIterator(new Node)).to.be.an.instanceof(NodeRecursiveIterator);
19
+ });
20
+
21
+ /**
22
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/yield
23
+ */
24
+ it('undefined should not result in undefined node', function () {
25
+ const iterator = new NodeRecursiveIterator(new Node);
26
+
27
+ const result = [];
28
+ for (const n of iterator) {
29
+ expect(n).to.be.an.instanceof(Node);
30
+ result.push(n.value);
31
+ }
32
+
33
+ expect(result).to.deep.equal([undefined]);
34
+
35
+ });
36
+
37
+ it('should iterate', function () {
38
+ const node =
39
+ new Node('1')
40
+ node.appendChild(
41
+ (new Node('2')).appendChild(new Node('2.1')).appendChild(new Node('2.2')).appendChild(new Node('2.3'))).appendChild(new Node('3')).appendChild(new Node('4').appendChild(new Node('4.1')).appendChild(new Node('4.2')));
42
+
43
+ const iterator = new NodeRecursiveIterator(node);
44
+
45
+ const result = [];
46
+ for (const n of iterator) {
47
+ expect(n).to.be.an.instanceof(Node);
48
+ result.push(n.value);
49
+ }
50
+
51
+ expect(result).to.deep.equal(['1', '2', '2.1', '2.2', '2.3', '3', '4', '4.1', '4.2']);
52
+
53
+ });
54
+
55
+ it('should iterate nodelist', function () {
56
+ const nodeList = new NodeList();
57
+
58
+ nodeList.add(
59
+ (new Node('2')).appendChild(new Node('2.1')).appendChild(new Node('2.2')).appendChild(new Node('2.3')).appendChild(new Node('3')).appendChild(new Node('4').appendChild(new Node('4.1')).appendChild(new Node('4.2'))));
60
+
61
+ nodeList.add(new Node('x'));
62
+
63
+ const iterator = new NodeRecursiveIterator(nodeList);
64
+
65
+ const result = [];
66
+ for (const n of iterator) {
67
+ expect(n).to.be.an.instanceof(Node);
68
+ result.push(n.value);
69
+ }
70
+
71
+ expect(result).to.deep.equal(['2', '2.1', '2.2', '2.3', '3', '4', '4.1', '4.2', 'x']);
72
+
73
+ });
74
+
75
+ });
@@ -0,0 +1,32 @@
1
+ import * as Crypto from "@peculiar/webcrypto";
2
+
3
+ import {expect} from "chai"
4
+ import {escapeString} from "../../../source/types/regex.js"
5
+
6
+ if (!global['crypto']) {
7
+ global['crypto'] = new Crypto.Crypto();
8
+ }
9
+
10
+ describe('escapeString', function () {
11
+
12
+
13
+ [
14
+ ['test1', 'test1'],
15
+ ['${', '\\$\\{'],
16
+ ['i18n{', 'i18n\\{'],
17
+ ['//', '//'],
18
+ ['\\', '\\\\'],
19
+
20
+ ].forEach(function (data) {
21
+
22
+ let a = data.shift()
23
+ let b = data.shift()
24
+
25
+ it('escapeString(' + a + ') should return ' + b, function () {
26
+ expect(escapeString(a)).is.equal(b)
27
+ });
28
+ });
29
+
30
+
31
+ });
32
+
@@ -15,7 +15,6 @@ export const isNode = new Function("try {return this===global;}catch(e){return f
15
15
  */
16
16
  function initJSDOM(options) {
17
17
  if (typeof window === "object" && window['DOMParser']) return Promise.resolve();
18
- // if(isBrowser()) return Promise.resolve();
19
18
 
20
19
  const g = getGlobal();
21
20
 
@@ -22,12 +22,14 @@ import "../cases/dom/worker/factory.js";
22
22
  import "../cases/dom/focusmanager.js";
23
23
  import "../cases/dom/events.js";
24
24
  import "../cases/dom/customelement.js";
25
+ import "../cases/i18n/formatter.js";
25
26
  import "../cases/i18n/providers/fetch.js";
26
27
  import "../cases/i18n/translations.js";
27
28
  import "../cases/i18n/locale.js";
28
29
  import "../cases/i18n/provider.js";
29
30
  import "../cases/types/queue.js";
30
31
  import "../cases/types/binary.js";
32
+ import "../cases/types/regex.js";
31
33
  import "../cases/types/observer.js";
32
34
  import "../cases/types/global.js";
33
35
  import "../cases/types/observerlist.js";
@@ -35,6 +37,7 @@ import "../cases/types/basewithoptions.js";
35
37
  import "../cases/types/is.js";
36
38
  import "../cases/types/proxyobserver.js";
37
39
  import "../cases/types/uniquequeue.js";
40
+ import "../cases/types/node.js";
38
41
  import "../cases/types/tokenlist.js";
39
42
  import "../cases/types/typeof.js";
40
43
  import "../cases/types/uuid.js";
@@ -42,8 +45,10 @@ import "../cases/types/mediatype.js";
42
45
  import "../cases/types/dataurl.js";
43
46
  import "../cases/types/base.js";
44
47
  import "../cases/types/version.js";
48
+ import "../cases/types/nodelist.js";
45
49
  import "../cases/types/id.js";
46
50
  import "../cases/types/randomid.js";
51
+ import "../cases/types/noderecursiveiterator.js";
47
52
  import "../cases/types/validate.js";
48
53
  import "../cases/types/stack.js";
49
54
  import "../cases/constraint/isobject.js";
@@ -63,6 +68,7 @@ import "../cases/data/extend.js";
63
68
  import "../cases/data/diff.js";
64
69
  import "../cases/data/buildmap.js";
65
70
  import "../cases/data/datasource.js";
71
+ import "../cases/data/buildtree.js";
66
72
  import "../cases/data/transformer.js";
67
73
  import "../cases/data/datasource/restapi.js";
68
74
  import "../cases/data/datasource/storage/sessionstorage.js";
@@ -10,13 +10,13 @@
10
10
  crossorigin="anonymous"
11
11
  referrerpolicy="no-referrer"></script>
12
12
 
13
- <script src="https://monsterjs.org/dist/1.25.0/dist/monster.dev.js"></script>
13
+ <script src="https://monsterjs.org/dist/1.28.0/dist/monster.dev.js"></script>
14
14
 
15
15
  </head>
16
16
  <body>
17
17
  <div id="headline" style="display: flex;align-items: center;justify-content: center;flex-direction: column;">
18
- <h1 style='margin-bottom: 0.1em;'>Monster 1.25.0</h1>
19
- <div id="lastupdate" style='font-size:0.7em'>last update Mo 22. Nov 19:57:57 CET 2021</div>
18
+ <h1 style='margin-bottom: 0.1em;'>Monster 1.28.0</h1>
19
+ <div id="lastupdate" style='font-size:0.7em'>last update So 12. Dez 10:22:38 CET 2021</div>
20
20
  </div>
21
21
  </body>
22
22
  </html>
@@ -14,8 +14,8 @@
14
14
  </head>
15
15
  <body>
16
16
  <div id="headline" style="display: flex;align-items: center;justify-content: center;flex-direction: column;">
17
- <h1 style='margin-bottom: 0.1em;'>Monster 1.25.0</h1>
18
- <div id="lastupdate" style='font-size:0.7em'>last update Mo 22. Nov 19:57:57 CET 2021</div>
17
+ <h1 style='margin-bottom: 0.1em;'>Monster 1.28.0</h1>
18
+ <div id="lastupdate" style='font-size:0.7em'>last update So 12. Dez 10:22:38 CET 2021</div>
19
19
  </div>
20
20
  </body>
21
21
  </html>
@@ -5,15 +5,15 @@
5
5
  <title>Mocha Monster</title>
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
7
7
  <link rel="stylesheet" href="mocha.css"/>
8
- <script id="polyfill" src="https://polyfill.io/v3/polyfill.min.js?features=Array.from,Array.isArray,Array.prototype.entries,Array.prototype.fill,Array.prototype.filter,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.keys,Array.prototype.lastIndexOf,Array.prototype.map,Array.prototype.reduce,Array.prototype.sort,ArrayBuffer,atob,DataView,document,Document,DocumentFragment,Element,Event,fetch,globalThis,HTMLDocument,HTMLTemplateElement,Intl,JSON,Map,Math.log2,Number.isInteger,Object.assign,Object.defineProperty,Object.entries,Object.freeze,Object.getOwnPropertyDescriptor,Object.getOwnPropertyNames,Object.getPrototypeOf,Object.keys,Promise,Reflect,Reflect.defineProperty,Reflect.get,Reflect.getOwnPropertyDescriptor,Reflect.setPrototypeOf,Set,String.prototype.endsWith,String.prototype.startsWith,String.prototype.trim,Symbol,Symbol.iterator,Uint16Array,Uint8Array,URL,WeakMap,WeakSet"
8
+ <script id="polyfill" src="https://polyfill.io/v3/polyfill.min.js?features=Array.from,Array.isArray,Array.prototype.entries,Array.prototype.fill,Array.prototype.filter,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.keys,Array.prototype.lastIndexOf,Array.prototype.map,Array.prototype.reduce,Array.prototype.sort,ArrayBuffer,atob,DataView,document,Document,DocumentFragment,Element,Event,fetch,globalThis,HTMLDocument,HTMLTemplateElement,Intl,JSON,Map,Math.log2,Number.isInteger,Object.assign,Object.defineProperty,Object.entries,Object.freeze,Object.getOwnPropertyDescriptor,Object.getOwnPropertyNames,Object.getPrototypeOf,Object.keys,Promise,Reflect,Reflect.defineProperty,Reflect.get,Reflect.getOwnPropertyDescriptor,Reflect.setPrototypeOf,Set,String.prototype.endsWith,String.prototype.padStart,String.prototype.startsWith,String.prototype.trim,Symbol,Symbol.iterator,Uint16Array,Uint8Array,URL,WeakMap,WeakSet"
9
9
  crossorigin="anonymous"
10
10
  referrerpolicy="no-referrer"></script>
11
11
 
12
12
  </head>
13
13
  <body>
14
14
  <div id="headline" style="display: flex;align-items: center;justify-content: center;flex-direction: column;">
15
- <h1 style='margin-bottom: 0.1em;'>Monster 1.25.0</h1>
16
- <div id="lastupdate" style='font-size:0.7em'>last update Mo 22. Nov 19:57:57 CET 2021</div>
15
+ <h1 style='margin-bottom: 0.1em;'>Monster 1.28.0</h1>
16
+ <div id="lastupdate" style='font-size:0.7em'>last update So 12. Dez 10:22:38 CET 2021</div>
17
17
  </div>
18
18
  <div id="mocks"></div>
19
19
  <div id="mocha"></div>