binarius
Advanced tools
Comparing version 0.0.2 to 0.0.4
@@ -129,3 +129,3 @@ // fallback to using Number if BigInt is not available | ||
if (typeof one === 'bigint') value = BigInt(value); | ||
this.value = (this.value & ~masks[field]) | (value << offsets[field]); | ||
this.value = (this.value & ~(masks[field] << offsets[field])) | (value << offsets[field]); | ||
return this; | ||
@@ -132,0 +132,0 @@ } |
@@ -93,2 +93,3 @@ const binarius = require('./index'); | ||
expect(new BinariusBits([1, 0, 1]).set('gender', 1).get('gender')).toBe(1); | ||
expect(new BinariusBits([1, 0, 1]).set('human', 0).get('human')).toBe(0); | ||
}); | ||
@@ -95,0 +96,0 @@ }); |
{ | ||
"name": "binarius", | ||
"version": "0.0.2", | ||
"version": "0.0.4", | ||
"description": "Store and operate on data in Numbers and BigInts for memory savings, performance, and fun.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
15234
5
315