1.0.0 • Published 2 years ago

bit-wrapper v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

BitWrapper for shift boolean array to number

Installation

$ npm install bit-wrapper

Exmaple

const array = [true, true, false, true, false, false, true];
const folded = shiftBits(array);
console.log("folded", folded);
const unfolded = unShiftBits(folded, array.length);
console.log("unfolded", unfolded)
console.log("x16 unfolded", unfold(folded, 16))