1.0.5 • Published 6 years ago

bit-util v1.0.5

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

Bit operation utils

Bit operation utils

getBitValue

 getBitValue(10,0);
 // => 0

 getBitValue(10,1);
 // => 1

 getBitValue(10,2);
 // => 0

 getBitValue(10,3);
 // => 1

setBitValue

 setBitValue(10,0,1);
 // => 11

 setBitValue(10,1,0);
 // => 8

 setBitValue(10,2,1);
 // => 14

 setBitValue(10,3,0);
 // => 2

checkBitValue

 checkBitValue(10,0);
 // => false

 checkBitValue(10,1);
 // => true

 checkBitValue(10,2);
 // => false

 checkBitValue(10,3);
 // => true

reverseBitValue

 reverseBitValue(10,0);
 // => 11

 reverseBitValue(10,1);
 // => 8

 reverseBitValue(10,2);
 // => 14

 reverseBitValue(10,3);
 // => 2
1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago