big-sparse-array
Advanced tools
Comparing version 1.0.0 to 1.0.1
16
index.js
@@ -20,9 +20,11 @@ const FACTOR = new Uint16Array(8) | ||
set (index, val) { | ||
while (val !== undefined && index >= this.maxLength) { | ||
this.maxLength *= 4096 | ||
this.factor++ | ||
if (!this.tiny.isEmptyish()) { | ||
const t = new TinyArray() | ||
t.set(0, this.tiny) | ||
this.tiny = t | ||
if (val !== undefined) { | ||
while (index >= this.maxLength) { | ||
this.maxLength *= 4096 | ||
this.factor++ | ||
if (!this.tiny.isEmptyish()) { | ||
const t = new TinyArray() | ||
t.set(0, this.tiny) | ||
this.tiny = t | ||
} | ||
} | ||
@@ -29,0 +31,0 @@ } |
{ | ||
"name": "big-sparse-array", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A sparse array optimised for low memory whilst still being fast", | ||
@@ -11,2 +11,5 @@ "main": "index.js", | ||
}, | ||
"scripts": { | ||
"test": "standard && tape test.js" | ||
}, | ||
"repository": { | ||
@@ -13,0 +16,0 @@ "type": "git", |
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
6132
6
126