0.0.2 • Published 7 years ago

bit-switch v0.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Bit Switch Build Status

A helper class to store on/off states in one integer.

usage

const bitSwitch = new BitSwitch(32);
console.log('5', bitSwitch.get(5));	//	true
console.log('3', bitSwitch.get(3));	//	false


bitSwitch.set(4, 1);
console.log('4', bitSwitch.get(4));	//	true
bitSwitch.set(4, 0);
console.log('4', bitSwitch.get(4));	//	false