@blackglory/structures
Advanced tools
Comparing version 0.10.5 to 0.10.6
@@ -30,3 +30,3 @@ "use strict"; | ||
if ((element & mask) === mask) { | ||
yield index * 8 + bit; | ||
yield index * BitSet.bitsPerElement + bit; | ||
} | ||
@@ -39,3 +39,3 @@ } | ||
if ((lastElement & mask) === mask) { | ||
yield lastIndex * 8 + bit; | ||
yield lastIndex * BitSet.bitsPerElement + bit; | ||
} | ||
@@ -47,7 +47,6 @@ } | ||
const result = []; | ||
const expectedBinaryStringLength = Uint8Array.BYTES_PER_ELEMENT * 8; | ||
for (let i = 0; i < this.array.length; i++) { | ||
const binary = this.array.internalTypedArray[i].toString(2); | ||
if (binary.length < expectedBinaryStringLength) { | ||
result.push('0'.repeat(expectedBinaryStringLength - binary.length) + binary); | ||
if (binary.length < BitSet.bitsPerElement) { | ||
result.push('0'.repeat(BitSet.bitsPerElement - binary.length) + binary); | ||
} | ||
@@ -62,3 +61,3 @@ else { | ||
var _a; | ||
const { index, mask } = this.getPosition(value); | ||
const [index, mask] = this.getPosition(value); | ||
return (((_a = this.array.get(index)) !== null && _a !== void 0 ? _a : 0) & mask) === mask; | ||
@@ -72,3 +71,3 @@ } | ||
} | ||
const { index, mask } = this.getPosition(value); | ||
const [index, mask] = this.getPosition(value); | ||
this.array.set(index, ((_a = this.array.get(index)) !== null && _a !== void 0 ? _a : 0) | mask); | ||
@@ -78,3 +77,3 @@ } | ||
var _a; | ||
const { index, mask } = this.getPosition(value); | ||
const [index, mask] = this.getPosition(value); | ||
this.array.set(index, ((_a = this.array.get(index)) !== null && _a !== void 0 ? _a : 0) & ~mask); | ||
@@ -92,3 +91,3 @@ } | ||
const mask = this.getMask(remainder); | ||
return { index, mask }; | ||
return [index, mask]; | ||
} | ||
@@ -95,0 +94,0 @@ getMask(value) { |
@@ -30,3 +30,3 @@ "use strict"; | ||
if ((element & mask) === mask) { | ||
yield index * 8 + bit; | ||
yield index * BitSet.bitsPerElement + bit; | ||
} | ||
@@ -39,3 +39,3 @@ } | ||
if ((lastElement & mask) === mask) { | ||
yield lastIndex * 8 + bit; | ||
yield lastIndex * BitSet.bitsPerElement + bit; | ||
} | ||
@@ -47,7 +47,6 @@ } | ||
const result = []; | ||
const expectedBinaryStringLength = Uint8Array.BYTES_PER_ELEMENT * 8; | ||
for (let i = 0; i < this.array.length; i++) { | ||
const binary = this.array.internalTypedArray[i].toString(2); | ||
if (binary.length < expectedBinaryStringLength) { | ||
result.push('0'.repeat(expectedBinaryStringLength - binary.length) + binary); | ||
if (binary.length < BitSet.bitsPerElement) { | ||
result.push('0'.repeat(BitSet.bitsPerElement - binary.length) + binary); | ||
} | ||
@@ -62,3 +61,3 @@ else { | ||
var _a; | ||
const { index, mask } = this.getPosition(value); | ||
const [index, mask] = this.getPosition(value); | ||
return (((_a = this.array.get(index)) !== null && _a !== void 0 ? _a : 0) & mask) === mask; | ||
@@ -72,3 +71,3 @@ } | ||
} | ||
const { index, mask } = this.getPosition(value); | ||
const [index, mask] = this.getPosition(value); | ||
this.array.set(index, ((_a = this.array.get(index)) !== null && _a !== void 0 ? _a : 0) | mask); | ||
@@ -78,3 +77,3 @@ } | ||
var _a; | ||
const { index, mask } = this.getPosition(value); | ||
const [index, mask] = this.getPosition(value); | ||
this.array.set(index, ((_a = this.array.get(index)) !== null && _a !== void 0 ? _a : 0) & ~mask); | ||
@@ -92,3 +91,3 @@ } | ||
const mask = this.getMask(remainder); | ||
return { index, mask }; | ||
return [index, mask]; | ||
} | ||
@@ -95,0 +94,0 @@ getMask(value) { |
{ | ||
"name": "@blackglory/structures", | ||
"version": "0.10.5", | ||
"version": "0.10.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "files": [ |
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
11894826
68670