+1
-1
| { | ||
| "name": "xterm", | ||
| "description": "Full xterm terminal, in your browser", | ||
| "version": "5.3.0-beta.45", | ||
| "version": "5.3.0-beta.46", | ||
| "main": "lib/xterm.js", | ||
@@ -6,0 +6,0 @@ "style": "css/xterm.css", |
@@ -53,2 +53,38 @@ /** | ||
| export class MutableDisposable<T extends IDisposable> implements IDisposable { | ||
| private _value?: T; | ||
| private _isDisposed = false; | ||
| /** | ||
| * Gets the value if it exists. | ||
| */ | ||
| public get value(): T | undefined { | ||
| return this._isDisposed ? undefined : this._value; | ||
| } | ||
| /** | ||
| * Sets the value, disposing of the old value if it exists. | ||
| */ | ||
| public set value(value: T | undefined) { | ||
| if (this._isDisposed || value === this._value) { | ||
| return; | ||
| } | ||
| this._value?.dispose(); | ||
| this._value = value; | ||
| } | ||
| /** | ||
| * Resets the stored value and disposes of the previously stored value. | ||
| */ | ||
| public clear(): void { | ||
| this.value = undefined; | ||
| } | ||
| public dispose(): void { | ||
| this._isDisposed = true; | ||
| this._value?.dispose(); | ||
| this._value = undefined; | ||
| } | ||
| } | ||
| /** | ||
@@ -55,0 +91,0 @@ * Wrap a function in a disposable. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
2344106
0.1%24436
0.13%