We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Sets a bit.
bit.set(x, i, [f]); // x: an int32 // i: bit index // f: bit value (1)
const bit = require('extra-bit'); bit.set(6, 0, 1); // 7 (110,0,1 => 111) bit.set(6, 2, 1); // 6 (110,2,1 => 110) bit.set(6, 2, 0); // 2 (110,2,0 => 010)