@blackglory/structures
Advanced tools
Comparing version 0.10.8 to 0.10.9
@@ -20,2 +20,3 @@ import { TypedArrayConstructor, TypedArrayOfConstructor } from 'justypes'; | ||
pop(): number | undefined; | ||
sort(compare?: (a: number, b: number) => number): void; | ||
private resize; | ||
@@ -22,0 +23,0 @@ } |
@@ -64,2 +64,8 @@ "use strict"; | ||
} | ||
sort(compare) { | ||
const capacity = this.capacity; | ||
this.resize(this.length); | ||
this.array.sort(compare); | ||
this.resize(capacity); | ||
} | ||
resize(newCapacity) { | ||
@@ -66,0 +72,0 @@ if (this.array.length === newCapacity) { |
@@ -20,2 +20,3 @@ import { TypedArrayConstructor, TypedArrayOfConstructor } from 'justypes'; | ||
pop(): number | undefined; | ||
sort(compare?: (a: number, b: number) => number): void; | ||
private resize; | ||
@@ -22,0 +23,0 @@ } |
@@ -64,2 +64,8 @@ "use strict"; | ||
} | ||
sort(compare) { | ||
const capacity = this.capacity; | ||
this.resize(this.length); | ||
this.array.sort(compare); | ||
this.resize(capacity); | ||
} | ||
resize(newCapacity) { | ||
@@ -66,0 +72,0 @@ if (this.array.length === newCapacity) { |
{ | ||
"name": "@blackglory/structures", | ||
"version": "0.10.8", | ||
"version": "0.10.9", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -270,2 +270,3 @@ # structures | ||
pop(): number | undefined | ||
sort(compare?: (a: number, b: number) => number): void | ||
} | ||
@@ -272,0 +273,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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11904744
68770
340