1.0.11 • Published 3 years ago

@ficlabapp/bitfield v1.0.11

Weekly downloads
11
License
ISC
Repository
github
Last release
3 years ago

Bitfield

A generic bitfield manipulation class, used to abstract defined parts of a BigInt as boolean or BigInt properties on an object.

Usage

// start with one integer property two bits wide at offset 4, initialised to zero
var b = new bitField({myProp: { offset: 4, size: 2 }, 0n);

// add a boolean property at offset 1
b.defineProperty("otherProp", 1);

// add another integer property two bits wide at offset 2
b.defineProperty("oneMoreProp", 2, 2);

// set some values
b.otherProp = true;
b.oneMoreProp = 3;
1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago