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

@blackglory/structures

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blackglory/structures - npm Package Compare versions

Comparing version 0.1.13 to 0.1.14

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [0.1.14](https://github.com/BlackGlory/structures/compare/v0.1.13...v0.1.14) (2021-03-16)
### Features
* add Queue#remove ([b5f4ad6](https://github.com/BlackGlory/structures/commit/b5f4ad65c43f74edca9bafa43db9dad8b33ad098))
### [0.1.13](https://github.com/BlackGlory/structures/compare/v0.1.12...v0.1.13) (2021-02-28)

@@ -7,0 +14,0 @@

20

dist/es2015/index.umd.js

@@ -111,3 +111,3 @@ (function (global, factory) {

exports.CustomError = CustomError;
//# sourceMappingURL=custom-error.js.map
});

@@ -121,3 +121,3 @@

exports.ExpectedError = ExpectedError;
//# sourceMappingURL=expected-error.js.map
});

@@ -131,3 +131,3 @@

exports.AssertionError = AssertionError;
//# sourceMappingURL=assertion-error.js.map
});

@@ -146,3 +146,3 @@

exports.normalize = normalize;
//# sourceMappingURL=normalize.js.map
});

@@ -158,3 +158,3 @@

exports.refute = refute;
//# sourceMappingURL=refute.js.map
});

@@ -170,3 +170,3 @@

exports.assert = assert;
//# sourceMappingURL=assert.js.map
});

@@ -190,3 +190,3 @@

__exportStar(assert_1, exports);
//# sourceMappingURL=index.js.map
});

@@ -216,2 +216,8 @@

}
remove(item) {
let index;
while ((index = __classPrivateFieldGet(this, _items).indexOf(item)) >= 0) {
__classPrivateFieldGet(this, _items).splice(index, 1);
}
}
}

@@ -218,0 +224,0 @@ _items = new WeakMap();

@@ -16,3 +16,3 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Structures={})}(this,(function(e){"use strict";

***************************************************************************** */
function t(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}var r,n;r=new WeakMap;class s{constructor(e){this.hash=e,n.set(this,new Map)}add(e){return t(this,n).set(this.hash(e),e),this}delete(e){return t(this,n).delete(this.hash(e))}has(e){return t(this,n).has(this.hash(e))}clear(){t(this,n).clear()}values(){return t(this,n).values()}get size(){return t(this,n).size}get[(n=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}[Symbol.iterator](){return t(this,n).values()}}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){var t={exports:{}};return e(t,t.exports),t.exports}var u,a=i((function(e,t){t.CustomError=void 0;class r extends Error{get name(){return this.constructor.name}}t.CustomError=r})),c=i((function(e,t){t.ExpectedError=void 0;class r extends a.CustomError{}t.ExpectedError=r})),h=i((function(e,t){t.AssertionError=void 0;class r extends a.CustomError{}t.AssertionError=r})),f=i((function(e,t){t.normalize=void 0,t.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}}})),d=i((function(e,t){t.refute=void 0,t.refute=function(e,t){if(e)throw new c.ExpectedError(t)}})),l=i((function(e,t){t.assert=void 0,t.assert=function(e,t){if(!e)throw new h.AssertionError(t)}})),p=i((function(e,t){var r=o&&o.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=o&&o.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};n(a,t),n(c,t),n(h,t),n(f,t),n(d,t),n(l,t)}));u=new WeakMap;class m extends p.CustomError{constructor(){super("Queue is empty.")}}e.Emitter=class{constructor(){r.set(this,new Map)}on(e,n){t(this,r).has(e)||t(this,r).set(e,new Set);t(this,r).get(e).add(n)}off(e,n){if(t(this,r).has(e)){const s=t(this,r).get(e);s.delete(n),0===s.size&&t(this,r).delete(e)}}emit(e,n){if(t(this,r).has(e)){t(this,r).get(e).forEach((e=>e(n)))}}},e.EmptyQueueError=m,e.HashSet=s,e.Queue=class{constructor(){u.set(this,[])}empty(){t(this,u).length=0}enqueue(...e){t(this,u).push(...e)}dequeue(){if(0===this.size)throw new m;return t(this,u).shift()}get size(){return t(this,u).length}},e.convertConsToArray=function e([t,r]){return null===r?[t]:[t,...e(r)]},Object.defineProperty(e,"__esModule",{value:!0})}));
function t(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}var r,s;r=new WeakMap;class n{constructor(e){this.hash=e,s.set(this,new Map)}add(e){return t(this,s).set(this.hash(e),e),this}delete(e){return t(this,s).delete(this.hash(e))}has(e){return t(this,s).has(this.hash(e))}clear(){t(this,s).clear()}values(){return t(this,s).values()}get size(){return t(this,s).size}get[(s=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}[Symbol.iterator](){return t(this,s).values()}}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){var t={exports:{}};return e(t,t.exports),t.exports}var u,a=i((function(e,t){t.CustomError=void 0;class r extends Error{get name(){return this.constructor.name}}t.CustomError=r})),h=i((function(e,t){t.ExpectedError=void 0;class r extends a.CustomError{}t.ExpectedError=r})),c=i((function(e,t){t.AssertionError=void 0;class r extends a.CustomError{}t.AssertionError=r})),f=i((function(e,t){t.normalize=void 0,t.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}}})),l=i((function(e,t){t.refute=void 0,t.refute=function(e,t){if(e)throw new h.ExpectedError(t)}})),d=i((function(e,t){t.assert=void 0,t.assert=function(e,t){if(!e)throw new c.AssertionError(t)}})),p=i((function(e,t){var r=o&&o.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),s=o&&o.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||r(t,e,s)};s(a,t),s(h,t),s(c,t),s(f,t),s(l,t),s(d,t)}));u=new WeakMap;class m extends p.CustomError{constructor(){super("Queue is empty.")}}e.Emitter=class{constructor(){r.set(this,new Map)}on(e,s){t(this,r).has(e)||t(this,r).set(e,new Set);t(this,r).get(e).add(s)}off(e,s){if(t(this,r).has(e)){const n=t(this,r).get(e);n.delete(s),0===n.size&&t(this,r).delete(e)}}emit(e,s){if(t(this,r).has(e)){t(this,r).get(e).forEach((e=>e(s)))}}},e.EmptyQueueError=m,e.HashSet=n,e.Queue=class{constructor(){u.set(this,[])}empty(){t(this,u).length=0}enqueue(...e){t(this,u).push(...e)}dequeue(){if(0===this.size)throw new m;return t(this,u).shift()}get size(){return t(this,u).length}remove(e){let r;for(;(r=t(this,u).indexOf(e))>=0;)t(this,u).splice(r,1)}},e.convertConsToArray=function e([t,r]){return null===r?[t]:[t,...e(r)]},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.umd.min.js.map

@@ -111,3 +111,3 @@ (function (global, factory) {

exports.CustomError = CustomError;
//# sourceMappingURL=custom-error.js.map
});

@@ -121,3 +121,3 @@

exports.ExpectedError = ExpectedError;
//# sourceMappingURL=expected-error.js.map
});

@@ -131,3 +131,3 @@

exports.AssertionError = AssertionError;
//# sourceMappingURL=assertion-error.js.map
});

@@ -146,3 +146,3 @@

exports.normalize = normalize;
//# sourceMappingURL=normalize.js.map
});

@@ -158,3 +158,3 @@

exports.refute = refute;
//# sourceMappingURL=refute.js.map
});

@@ -170,3 +170,3 @@

exports.assert = assert;
//# sourceMappingURL=assert.js.map
});

@@ -190,3 +190,3 @@

__exportStar(assert_1, exports);
//# sourceMappingURL=index.js.map
});

@@ -216,2 +216,8 @@

}
remove(item) {
let index;
while ((index = __classPrivateFieldGet(this, _items).indexOf(item)) >= 0) {
__classPrivateFieldGet(this, _items).splice(index, 1);
}
}
}

@@ -218,0 +224,0 @@ _items = new WeakMap();

@@ -16,3 +16,3 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Structures={})}(this,(function(e){"use strict";

***************************************************************************** */
function t(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}var r,n;r=new WeakMap;class s{constructor(e){this.hash=e,n.set(this,new Map)}add(e){return t(this,n).set(this.hash(e),e),this}delete(e){return t(this,n).delete(this.hash(e))}has(e){return t(this,n).has(this.hash(e))}clear(){t(this,n).clear()}values(){return t(this,n).values()}get size(){return t(this,n).size}get[(n=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}[Symbol.iterator](){return t(this,n).values()}}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){var t={exports:{}};return e(t,t.exports),t.exports}var u,a=i((function(e,t){t.CustomError=void 0;class r extends Error{get name(){return this.constructor.name}}t.CustomError=r})),c=i((function(e,t){t.ExpectedError=void 0;class r extends a.CustomError{}t.ExpectedError=r})),h=i((function(e,t){t.AssertionError=void 0;class r extends a.CustomError{}t.AssertionError=r})),f=i((function(e,t){t.normalize=void 0,t.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}}})),d=i((function(e,t){t.refute=void 0,t.refute=function(e,t){if(e)throw new c.ExpectedError(t)}})),l=i((function(e,t){t.assert=void 0,t.assert=function(e,t){if(!e)throw new h.AssertionError(t)}})),p=i((function(e,t){var r=o&&o.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=o&&o.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};n(a,t),n(c,t),n(h,t),n(f,t),n(d,t),n(l,t)}));u=new WeakMap;class m extends p.CustomError{constructor(){super("Queue is empty.")}}e.Emitter=class{constructor(){r.set(this,new Map)}on(e,n){t(this,r).has(e)||t(this,r).set(e,new Set);t(this,r).get(e).add(n)}off(e,n){if(t(this,r).has(e)){const s=t(this,r).get(e);s.delete(n),0===s.size&&t(this,r).delete(e)}}emit(e,n){if(t(this,r).has(e)){t(this,r).get(e).forEach((e=>e(n)))}}},e.EmptyQueueError=m,e.HashSet=s,e.Queue=class{constructor(){u.set(this,[])}empty(){t(this,u).length=0}enqueue(...e){t(this,u).push(...e)}dequeue(){if(0===this.size)throw new m;return t(this,u).shift()}get size(){return t(this,u).length}},e.convertConsToArray=function e([t,r]){return null===r?[t]:[t,...e(r)]},Object.defineProperty(e,"__esModule",{value:!0})}));
function t(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}var r,s;r=new WeakMap;class n{constructor(e){this.hash=e,s.set(this,new Map)}add(e){return t(this,s).set(this.hash(e),e),this}delete(e){return t(this,s).delete(this.hash(e))}has(e){return t(this,s).has(this.hash(e))}clear(){t(this,s).clear()}values(){return t(this,s).values()}get size(){return t(this,s).size}get[(s=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}[Symbol.iterator](){return t(this,s).values()}}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){var t={exports:{}};return e(t,t.exports),t.exports}var u,a=i((function(e,t){t.CustomError=void 0;class r extends Error{get name(){return this.constructor.name}}t.CustomError=r})),h=i((function(e,t){t.ExpectedError=void 0;class r extends a.CustomError{}t.ExpectedError=r})),c=i((function(e,t){t.AssertionError=void 0;class r extends a.CustomError{}t.AssertionError=r})),f=i((function(e,t){t.normalize=void 0,t.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}}})),l=i((function(e,t){t.refute=void 0,t.refute=function(e,t){if(e)throw new h.ExpectedError(t)}})),d=i((function(e,t){t.assert=void 0,t.assert=function(e,t){if(!e)throw new c.AssertionError(t)}})),p=i((function(e,t){var r=o&&o.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),s=o&&o.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||r(t,e,s)};s(a,t),s(h,t),s(c,t),s(f,t),s(l,t),s(d,t)}));u=new WeakMap;class m extends p.CustomError{constructor(){super("Queue is empty.")}}e.Emitter=class{constructor(){r.set(this,new Map)}on(e,s){t(this,r).has(e)||t(this,r).set(e,new Set);t(this,r).get(e).add(s)}off(e,s){if(t(this,r).has(e)){const n=t(this,r).get(e);n.delete(s),0===n.size&&t(this,r).delete(e)}}emit(e,s){if(t(this,r).has(e)){t(this,r).get(e).forEach((e=>e(s)))}}},e.EmptyQueueError=m,e.HashSet=n,e.Queue=class{constructor(){u.set(this,[])}empty(){t(this,u).length=0}enqueue(...e){t(this,u).push(...e)}dequeue(){if(0===this.size)throw new m;return t(this,u).shift()}get size(){return t(this,u).length}remove(e){let r;for(;(r=t(this,u).indexOf(e))>=0;)t(this,u).splice(r,1)}},e.convertConsToArray=function e([t,r]){return null===r?[t]:[t,...e(r)]},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.umd.min.js.map

@@ -8,2 +8,3 @@ import { CustomError } from '@blackglory/errors';

get size(): number;
remove(item: T): void;
}

@@ -10,0 +11,0 @@ export declare class EmptyQueueError extends CustomError {

@@ -30,2 +30,8 @@ "use strict";

}
remove(item) {
let index;
while ((index = __classPrivateFieldGet(this, _items).indexOf(item)) >= 0) {
__classPrivateFieldGet(this, _items).splice(index, 1);
}
}
}

@@ -32,0 +38,0 @@ exports.Queue = Queue;

@@ -8,2 +8,3 @@ import { CustomError } from '@blackglory/errors';

get size(): number;
remove(item: T): void;
}

@@ -10,0 +11,0 @@ export declare class EmptyQueueError extends CustomError {

@@ -30,2 +30,8 @@ "use strict";

}
remove(item) {
let index;
while ((index = __classPrivateFieldGet(this, _items).indexOf(item)) >= 0) {
__classPrivateFieldGet(this, _items).splice(index, 1);
}
}
}

@@ -32,0 +38,0 @@ exports.Queue = Queue;

{
"name": "@blackglory/structures",
"version": "0.1.13",
"version": "0.1.14",
"description": "",

@@ -50,6 +50,6 @@ "files": [

"@types/jest": "^26.0.20",
"@types/node": "^14.14.31",
"@typescript-eslint/eslint-plugin": "^4.15.2",
"@typescript-eslint/parser": "^4.15.2",
"eslint": "^7.21.0",
"@types/node": "^14.14.35",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"eslint": "^7.22.0",
"husky": "^4.3.8",

@@ -60,10 +60,10 @@ "jest": "^26.6.3",

"rimraf": "^3.0.2",
"rollup": "^2.40.0",
"rollup": "^2.41.2",
"rollup-plugin-analyzer": "^4.0.0",
"rollup-plugin-terser": "^7.0.2",
"standard-version": "^9.1.1",
"ts-jest": "^26.5.2",
"ts-jest": "^26.5.3",
"tscpaths": "^0.0.9",
"tslib": "^2.1.0",
"typescript": "^4.2.2"
"typescript": "^4.2.3"
},

@@ -70,0 +70,0 @@ "dependencies": {

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

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

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

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

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