@schukai/monster 2.0.14 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/source/constants.mjs +15 -3
  4. package/source/constraints/abstract.mjs +11 -0
  5. package/source/constraints/abstractoperator.mjs +11 -1
  6. package/source/constraints/andoperator.mjs +11 -1
  7. package/source/constraints/invalid.mjs +11 -1
  8. package/source/constraints/isarray.mjs +11 -1
  9. package/source/constraints/isobject.mjs +11 -1
  10. package/source/constraints/namespace.mjs +5 -0
  11. package/source/constraints/oroperator.mjs +11 -1
  12. package/source/constraints/valid.mjs +11 -1
  13. package/source/data/datasource/namespace.mjs +5 -0
  14. package/source/data/datasource/restapi/namespace.mjs +5 -0
  15. package/source/data/datasource/restapi/writeerror.mjs +10 -1
  16. package/source/data/datasource/restapi.mjs +10 -1
  17. package/source/data/datasource/storage/localstorage.mjs +10 -1
  18. package/source/data/datasource/storage/namespace.mjs +5 -0
  19. package/source/data/datasource/storage/sessionstorage.mjs +10 -1
  20. package/source/data/datasource/storage.mjs +10 -1
  21. package/source/data/datasource.mjs +12 -2
  22. package/source/data/namespace.mjs +5 -0
  23. package/source/dom/customcontrol.mjs +11 -1
  24. package/source/dom/customelement.mjs +11 -1
  25. package/source/dom/focusmanager.mjs +11 -1
  26. package/source/dom/namespace.mjs +5 -0
  27. package/source/dom/resource/data.mjs +11 -1
  28. package/source/dom/resource/link/namespace.mjs +5 -0
  29. package/source/dom/resource/link/stylesheet.mjs +11 -1
  30. package/source/dom/resource/link.mjs +11 -1
  31. package/source/dom/resource/namespace.mjs +5 -0
  32. package/source/dom/resource/script.mjs +10 -1
  33. package/source/dom/resource.mjs +8 -0
  34. package/source/dom/template.mjs +11 -1
  35. package/source/dom/theme.mjs +11 -1
  36. package/source/dom/worker/namespace.mjs +5 -0
  37. package/source/i18n/namespace.mjs +5 -0
  38. package/source/i18n/providers/namespace.mjs +5 -0
  39. package/source/logging/handler/namespace.mjs +5 -0
  40. package/source/logging/namespace.mjs +5 -0
  41. package/source/math/namespace.mjs +5 -0
  42. package/source/text/namespace.mjs +5 -0
  43. package/source/types/base.mjs +100 -0
  44. package/source/types/dataurl.mjs +11 -1
  45. package/source/types/mediatype.mjs +11 -1
  46. package/source/types/namespace.mjs +5 -0
  47. package/source/types/node.mjs +11 -1
  48. package/source/types/nodelist.mjs +11 -1
  49. package/source/types/observer.mjs +11 -1
  50. package/source/types/proxyobserver.mjs +11 -1
  51. package/source/types/queue.mjs +11 -1
  52. package/source/types/stack.mjs +10 -1
  53. package/source/types/version.mjs +14 -2
  54. package/source/util/namespace.mjs +5 -0
  55. package/test/cases/constraint/abstractoperator.mjs +38 -0
  56. package/test/cases/dom/resource.mjs +48 -0
  57. package/test/cases/monster.mjs +1 -1
  58. package/test/cases/types/base.mjs +42 -0
  59. package/test/web/mocha.js +10976 -20806
  60. package/test/web/test.html +3 -3
  61. package/test/web/tests.js +68 -12
@@ -2,8 +2,29 @@
2
2
 
3
3
  import {expect} from "chai"
4
4
  import {Base} from "../../../../application/source/types/base.mjs";
5
+ import {instanceSymbol} from "../../../../application/source/constants.mjs";
5
6
 
6
7
 
8
+
9
+ class BaseDifferentRealm extends Object {
10
+
11
+
12
+ static get [instanceSymbol]() {
13
+ return Symbol.for("@schukai/monster/types/base");
14
+ }
15
+
16
+
17
+ }
18
+
19
+ class Subclass extends BaseDifferentRealm {
20
+ constructor() {
21
+ super();
22
+ }
23
+ static get [instanceSymbol]() {
24
+ return Symbol.for("@schukai/monster/types/subclass");
25
+ }
26
+ }
27
+
7
28
  describe('Base', function () {
8
29
 
9
30
  describe('new Base', function () {
@@ -17,5 +38,26 @@ describe('Base', function () {
17
38
  });
18
39
 
19
40
  })
41
+
42
+ describe('instancof', function () {
43
+
44
+ it('is instance of Base', function () {
45
+ expect(new Base).to.be.instanceOf(Base);
46
+ });
47
+
48
+ it('subclass instanceof', function () {
49
+
50
+ if (new Subclass instanceof Base) {
51
+ expect(true).to.be.true;
52
+ } else {
53
+ expect(false).to.be.true;
54
+ }
55
+
56
+
57
+
58
+ });
59
+
60
+
61
+ })
20
62
 
21
63
  })