Socket
Socket
Sign inDemoInstall

@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.10.0 to 0.10.1

lib/es2015/sorted-set.d.ts

1

lib/es2015/index.d.ts

@@ -18,1 +18,2 @@ export * from './box';

export { DynamicTypedArray } from './dynamic-typed-array';
export * from './sorted-set';

@@ -36,2 +36,3 @@ "use strict";

Object.defineProperty(exports, "DynamicTypedArray", { enumerable: true, get: function () { return dynamic_typed_array_1.DynamicTypedArray; } });
__exportStar(require("./sorted-set"), exports);
//# sourceMappingURL=index.js.map

@@ -6,2 +6,3 @@ export declare class SparseSet implements Iterable<number> {

[Symbol.iterator](): IterableIterator<number>;
constructor(array?: number[]);
values(): Iterable<number>;

@@ -8,0 +9,0 @@ has(value: number): boolean;

10

lib/es2015/sparse-set.js

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

class SparseSet {
constructor() {
constructor(array = []) {
this.indexToValue = [];
this.valueToIndex = [];
const valueToIndex = [];
if (array.length > 0) {
for (const [index, value] of array.entries()) {
valueToIndex[value] = index;
}
}
this.valueToIndex = valueToIndex;
}

@@ -10,0 +16,0 @@ get [Symbol.toStringTag]() {

@@ -18,1 +18,2 @@ export * from './box';

export { DynamicTypedArray } from './dynamic-typed-array';
export * from './sorted-set';

@@ -36,2 +36,3 @@ "use strict";

Object.defineProperty(exports, "DynamicTypedArray", { enumerable: true, get: function () { return dynamic_typed_array_1.DynamicTypedArray; } });
__exportStar(require("./sorted-set"), exports);
//# sourceMappingURL=index.js.map

@@ -6,2 +6,3 @@ export declare class SparseSet implements Iterable<number> {

[Symbol.iterator](): IterableIterator<number>;
constructor(array?: number[]);
values(): Iterable<number>;

@@ -8,0 +9,0 @@ has(value: number): boolean;

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

class SparseSet {
constructor() {
constructor(array = []) {
this.indexToValue = [];
this.valueToIndex = [];
const valueToIndex = [];
if (array.length > 0) {
for (const [index, value] of array.entries()) {
valueToIndex[value] = index;
}
}
this.valueToIndex = valueToIndex;
}

@@ -10,0 +16,0 @@ get [Symbol.toStringTag]() {

{
"name": "@blackglory/structures",
"version": "0.10.0",
"version": "0.10.1",
"description": "",

@@ -5,0 +5,0 @@ "files": [

@@ -216,2 +216,4 @@ # structures

constructor(array?: number[])
values(): Iterable<number>

@@ -280,4 +282,4 @@

has(value: number): boolean
add(value: number): void
has(value: number): boolean
delete(value: number): void

@@ -304,1 +306,16 @@ }

```
### SortedSet
```ts
class SortedSet<T> {
get [Symbol.toStringTag](): string
[Symbol.iterator](): IterableIterator<T>
constructor(compare: (a: T, b: T) => number)
values(): Iterable<T>
has(value: T): boolean
add(value: T): void
delete(value: T): void
}
```

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 too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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 too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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