value-enhancer
Advanced tools
Comparing version
@@ -26,2 +26,6 @@ interface ReadonlyVal<TValue = any> { | ||
unsubscribe(subscriber?: (...args: any[]) => any): void; | ||
/** | ||
* Remove all subscribers. | ||
*/ | ||
dispose(): void; | ||
} | ||
@@ -96,2 +100,3 @@ interface Val<TValue = any> extends ReadonlyVal<TValue> { | ||
unsubscribe(subscriber?: (...args: any[]) => any): void; | ||
dispose(): void; | ||
/** | ||
@@ -98,0 +103,0 @@ * @returns the string representation of `this.value`. |
@@ -181,2 +181,5 @@ 'use strict'; | ||
} | ||
dispose() { | ||
this._u.c(); | ||
} | ||
/** | ||
@@ -183,0 +186,0 @@ * @returns the string representation of `this.value`. |
{ | ||
"name": "value-enhancer", | ||
"version": "2.4.3", | ||
"version": "2.4.4", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "A tiny library to enhance value with reactive wrapper.", |
@@ -7,7 +7,12 @@ # [value-enhancer](https://github.com/crimx/value-enhancer) | ||
[](https://github.com/crimx/value-enhancer/actions/workflows/build.yml) | ||
[](https://github.com/crimx/value-enhancer/actions/workflows/build.yml) | ||
[](https://www.npmjs.com/package/value-enhancer) | ||
[](https://coveralls.io/github/crimx/value-enhancer?branch=main) | ||
[](https://bundlephobia.com/package/value-enhancer) | ||
[](https://bundlejs.com/?q=value-enhancer) | ||
[](https://bundlejs.com/?q=value-enhancer&treeshake=%5B%7Bval%7D%5D) | ||
[](https://bundlejs.com/?q=value-enhancer) | ||
[](https://bundlejs.com/?q=value-enhancer) | ||
[](https://bundlejs.com/?q=value-enhancer) | ||
[](http://commitizen.github.io/cz-cli/) | ||
@@ -14,0 +19,0 @@ [](https://conventionalcommits.org) |
@@ -87,2 +87,6 @@ import { SubscriberMode, Subscribers } from "./subscribers"; | ||
public dispose(): void { | ||
this._subs_.clear_(); | ||
} | ||
/** | ||
@@ -89,0 +93,0 @@ * @returns the string representation of `this.value`. |
@@ -26,2 +26,6 @@ export interface ReadonlyVal<TValue = any> { | ||
unsubscribe(subscriber?: (...args: any[]) => any): void; | ||
/** | ||
* Remove all subscribers. | ||
*/ | ||
dispose(): void; | ||
} | ||
@@ -28,0 +32,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
127592
0.82%1766
1.03%385
1.32%