
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.
queue-buffer
Advanced tools
A flex buffer which behaves as a dynamic queue with a complete but limited Buffer API.
A flex buffer which behaves as a dynamic queue with a complete but limited Buffer API.
npm install queue-buffer -S
then
QueueBuffer = require("queue-buffer");
buf = new QueueBuffer(10);
buf.write([1, 2, 3, 4, 5]);
buf.writeInt32LE(14);
buf.read(5);
QueueBuffer extends Flexbuffer, please see Flex-Buffer for more API info.
Auto release threshold(ms)
see FlexBuffer
param: arg { number | Buffer | Array | string }
The same arg as Buffer.
param: opts { Object={} }
options
option: autoRelease { boolean }
auto release useless space
option: autoReleaseThreshold { number }
auto release threshold(ms)
Release useless space which has been read.
Move current read offset.
param: size { number }
number of bytes to move, can be negative.
Move current read offset forward.
param: size { number }
number of bytes to skip
Move current read offset backward.
param: size { number }
number of bytes to rewind
Read bytes from the head of the buffer.
param: size { number }
number of bytes to read
return: { Buffer }
data
see FlexBuffer
param: value { number | string | Array | Buffer }
The value to write
param: encoding { string="utf8" }
string encoding
length of the data
All the native Buffer API is wrapped. However, read* methods can only read data from head, with no offset argument.
npm test
npm run benchmark
Environment: OS X 10.10.4, Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
io.js v2.4.0
Read
wrapped native API
io.js v3.0.0
see https://github.com/dracupid/flex-buffer#benchmark for more info
Read
wrapped native API
MIT@Jingchen Zhao
FAQs
A flex buffer which behaves as a dynamic queue with a complete but limited Buffer API.
We found that queue-buffer 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.