
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
simple-buffer-cursor
Advanced tools
Simplify reading and writing to buffers by internally maintaining the position. This library exposes a wrapper for a buffer that uses similar read and write methods to those found in the Node Buffer API.
Usage:
npm install simple-buffer-cursor
const BufferCursor = require('simple-buffer-cursor');
let buffer = BufferCursor(Buffer.alloc(8));
buffer.writeUInt8(1);
buffer.writeUInt16BE(2);
buffer.writeUInt32BE(3);
buffer.writeBytes(Buffer.from([4]));
buffer.position = 0;
console.log(buffer.readUInt8());
console.log(buffer.readUInt16BE());
console.log(buffer.readUInt32BE());
console.log(buffer.readBytes());
position: number - the current buffer cursor position
eof: bool - whether the current position is at the end of the buffer
buffer: Buffer - the underlying buffer
readUInt8(): number - reads 1 byte
readUInt16LE(): number - reads 2 bytes as 16-bit little-endian unsigned integer
readUInt16BE(): number - reads 2 bytes as 16-bit big-endian unsigned integer
readUInt32LE(): number - reads 4 bytes as 32-bit little-endian unsigned integer
readUInt32BE(): number - reads 4 bytes as 32-bit big-endian unsigned integer
readBytes([len]): Buffer - reads the optionally specified number of bytes. If no length is supplied, it reads to the end of the buffer.
writeUInt8(number): undefined - writes 1 byte
writeUInt16LE(number): undefined - writes a number as a 16-bit little-endian unsigned integer
writeUInt16BE(number): undefined - writes a number as a 16-bit big-endian unsigned integer
writeUInt32LE(number): undefined - writes a number as a 32-bit little-endian unsigned integer
writeUInt32BE(number): undefined - writes a number as a 32-bit big-endian unsigned integer
writeBytes(buffer): undefined - writes the supplied buffer to the cursor buffer
FAQs
Read and write to a buffer easily
We found that simple-buffer-cursor 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.