
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
NodeJS Buffer interface provides a way to manipulate bytes, but what if we needed to manipulate bits?
This library was created to address the gap of a built-in bit interface.
npm install bitview --save
new BitView(Length)
new BitView(buffer)
new BitView(buffer, byteOffset, length);
Buffer.from(arg)
length: length in bits
buffer: use an existing buffer
arg: Another interface to create a new BitView instance
arg could be an array of bits [1,0,1] or a string '1010' or a buffer.
byteOffset: default 0, starting offset of the bitview.
flips the value of the bit at location pos
Returns the value of the bit at location pos (0 or 1)
Sets the value of a bit at location pos to v
Returns a string representation of the BitView.
Returns the buffer used by the view.
Returns length in bits.
Usage:
const BitView = require("bitview")
const view= new BitView(10);
view.set(0,true);
console.log(view.get(0)); // true
view.flip(0)
console.log(view.get(0)); // false
const view2=BitView.from('101010');
console.log(view2.get(2)); // true
const view3=BitView.from([1, 0, 1]);
console.log(view3.get(1)); // false
console.log(view3.get(2)); // true
BitView uses bitwise operations to manipulate each bit in a buffer (Low Complexity)
FAQs
buffer bitview
We found that bitview demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.