bits
Usage
If you're using Node.js type:
npm install --save bits
Then load the module:
var bits = ;
If you'd like to use it in your browser application, just link the JS file:
You can also use script loaders like require.js:
;
Now here is the API:
var data = 0;data = bits;data = bits; // set bit 0, 3 and 7data = bitscleardata 1;data = bitscleardata 1 5; // clear bit 1,3,4,5data = bits;data = bits; // returns true or falsedata = bits; // returns 0 or 1
Test
npm test
License
MIT license