Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

destroyable

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

destroyable - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

4

dist/Destroyable.d.ts

@@ -9,3 +9,3 @@ import { IDestroyable } from './IDestroyable';

export declare abstract class Destroyable implements IDestroyable {
private _destroyed;
private _isDestroyed;
private subdestroyable;

@@ -15,3 +15,3 @@ /**

*/
get destroyed(): boolean;
get isDestroyed(): boolean;
destroy(): Promise<void>;

@@ -18,0 +18,0 @@ /**

@@ -53,6 +53,6 @@ "use strict";

// tslint:disable-next-line
this._destroyed = false;
this._isDestroyed = false;
this.subdestroyable = [];
}
Object.defineProperty(Destroyable.prototype, "destroyed", {
Object.defineProperty(Destroyable.prototype, "isDestroyed", {
/**

@@ -62,3 +62,3 @@ * TODO: !!! isDestroyed

get: function () {
return this._destroyed;
return this._isDestroyed;
},

@@ -75,3 +75,3 @@ enumerable: false,

this.checkWhetherNotDestroyed();
this._destroyed = true;
this._isDestroyed = true;
_i = 0, _a = this.subdestroyable;

@@ -114,3 +114,3 @@ _b.label = 1;

Destroyable.prototype.checkWhetherNotDestroyed = function (errorMessage, runBeforeError) {
if (this._destroyed) {
if (this._isDestroyed) {
if (runBeforeError) {

@@ -117,0 +117,0 @@ runBeforeError();

@@ -27,3 +27,3 @@ "use strict";

var _this = _super.call(this) || this;
executor(function () { return _this.destroyed; });
executor(function () { return _this.isDestroyed; });
return _this;

@@ -30,0 +30,0 @@ }

@@ -11,3 +11,3 @@ import { IAwaitable } from './IAwaitable';

*/
readonly destroyed: boolean;
readonly isDestroyed: boolean;
/**

@@ -14,0 +14,0 @@ * Destroy the object

import { AlreadyDestroyedError } from './AlreadyDestroyedError';
import { Destroyable } from './Destroyable';
import { DestroyableLoop } from './DestroyableLoop';

@@ -9,5 +10,2 @@ import { CollisionError } from './errors/CollisionError';

import { ISubscription } from './ISubscription';
import { IQueueOptions } from './Queue';
import { Queue } from './Queue';
import { Queues } from './Queues';
import { registerItemsInArray } from './registerItemsInArray';

@@ -20,2 +18,2 @@ import { registerItemsInSubjectOfArrays } from './registerItemsInSubjectOfArrays';

import { teardown } from './TeardownLogic';
export { Queue, Queues, teardown, IAwaitable, softDestroy, Registration, IDestroyable, IQueueOptions, ISubscription, NotFoundError, ITeardownLogic, CollisionError, DestroyableLoop, registerItemsInArray, registerPairsInObject, IRegisterItemsOptions, AlreadyDestroyedError, registerItemsInSubjectOfArrays };
export { teardown, IAwaitable, softDestroy, Destroyable, Registration, IDestroyable, ISubscription, NotFoundError, ITeardownLogic, CollisionError, DestroyableLoop, registerItemsInArray, registerPairsInObject, IRegisterItemsOptions, AlreadyDestroyedError, registerItemsInSubjectOfArrays };

@@ -5,5 +5,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.registerItemsInSubjectOfArrays = exports.AlreadyDestroyedError = exports.registerPairsInObject = exports.registerItemsInArray = exports.DestroyableLoop = exports.CollisionError = exports.NotFoundError = exports.Registration = exports.softDestroy = exports.teardown = exports.Queues = exports.Queue = void 0;
exports.registerItemsInSubjectOfArrays = exports.AlreadyDestroyedError = exports.registerPairsInObject = exports.registerItemsInArray = exports.DestroyableLoop = exports.CollisionError = exports.NotFoundError = exports.Registration = exports.Destroyable = exports.softDestroy = exports.teardown = void 0;
var AlreadyDestroyedError_1 = require("./AlreadyDestroyedError");
Object.defineProperty(exports, "AlreadyDestroyedError", { enumerable: true, get: function () { return AlreadyDestroyedError_1.AlreadyDestroyedError; } });
var Destroyable_1 = require("./Destroyable");
Object.defineProperty(exports, "Destroyable", { enumerable: true, get: function () { return Destroyable_1.Destroyable; } });
var DestroyableLoop_1 = require("./DestroyableLoop");

@@ -15,6 +17,2 @@ Object.defineProperty(exports, "DestroyableLoop", { enumerable: true, get: function () { return DestroyableLoop_1.DestroyableLoop; } });

Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return NotFoundError_1.NotFoundError; } });
var Queue_1 = require("./Queue");
Object.defineProperty(exports, "Queue", { enumerable: true, get: function () { return Queue_1.Queue; } });
var Queues_1 = require("./Queues");
Object.defineProperty(exports, "Queues", { enumerable: true, get: function () { return Queues_1.Queues; } });
var registerItemsInArray_1 = require("./registerItemsInArray");

@@ -21,0 +19,0 @@ Object.defineProperty(exports, "registerItemsInArray", { enumerable: true, get: function () { return registerItemsInArray_1.registerItemsInArray; } });

{
"name": "destroyable",
"version": "0.4.0",
"version": "0.5.0",
"description": "Multiple utilities that help to build destroyable objects in javascript",

@@ -5,0 +5,0 @@ "author": "Pavol Hejný <pavol@collboard.com> (https://pavolhejny.com)",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc