Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
cbuffer-fusion
Advanced tools
Readme
The end goal of this project is to implement the entire JavaScript Array.prototype
, and some
additional utility methods, as a circular buffer.
Note: This is called a circular buffer because of what this library accomplishes, but is implemented as an Array. This may be confusing for Node users, which may want to use a true Buffer.
While the entire Array.prototype
API is on the roadmap, it's not all quite here. Below is the
currently implemented API.
It's simple. Just use it like you would use an Array.
new CBuffer(10); // empty buffer with length of 10
new CBuffer(1,2,3,4); // buffer with length 4
CBuffer(5); // For those who are really lazy, new is optional
Included are several non-standard niceties. Like if you want to catch when data is overwritten,
just assign a function to the overflow
variable and it will be called whenever a value is about
to be overwritten and it will pass the value as the first argument:
var myBuff = CBuffer(4);
myBuff.overflow = function(data) {
console.log(data);
};
myBuff.push(1,2,3,4); // nothing shows up yet
myBuff.push(5); // log: 1
sort
, the default comparitor sorts by a > b
.value
would be inserted into a sorted circular buffer ranked by an optional comparitor.Array.length = 0
.FAQs
Circular Buffer JavaScript implementation
The npm package cbuffer-fusion receives a total of 1 weekly downloads. As such, cbuffer-fusion popularity was classified as not popular.
We found that cbuffer-fusion 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.