vivth 0.9.3 → 0.9.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vivth",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "extremely simple signal as library primitives",
5
5
  "main": "index.mjs",
6
6
  "types": "./types/index.d.mts",
@@ -31,7 +31,7 @@ export class Signal {
31
31
  * @return {void}
32
32
  */
33
33
  removeAll$ = () => {
34
- this.S.forEach(($_) => {
34
+ this.S?.forEach(($_) => {
35
35
  $_.remove$();
36
36
  });
37
37
  };
@@ -41,7 +41,7 @@ export class Signal {
41
41
  * @return {void}
42
42
  */
43
43
  remove$ = ($_) => {
44
- if ($.E.get($_).has(this)) {
44
+ if ($.E.get($_)?.has(this)) {
45
45
  $_.remove$();
46
46
  }
47
47
  };
@@ -64,6 +64,12 @@ export class Signal {
64
64
  * @type {Value}
65
65
  */
66
66
  V;
67
+ /**
68
+ * @type {Value}
69
+ */
70
+ get nonReactiveValue() {
71
+ return this.V;
72
+ }
67
73
  /**
68
74
  * @type {Value}
69
75
  */
@@ -43,6 +43,10 @@ export class Signal<Value> {
43
43
  */
44
44
  private P;
45
45
  get prev(): Value;
46
+ /**
47
+ * @type {Value}
48
+ */
49
+ get nonReactiveValue(): Value;
46
50
  /**
47
51
  * @type {Value}
48
52
  */