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.
eventstapler
Advanced tools
Event Stapler is a utility to attach a collection of event listeners to an emitter in such a way that it is very easy to unbind them all later. All events attached via a staple can be detached in a single call, or after a specific event is fired by the e
Readme
Event Stapler is a utility to attach a collection of event listeners to an emitter in such a way that it is very easy to unbind them all later. All events attached via a staple can be detached in a single call, or after a specific event is fired by the emitter.
const eventStapler = require('.');
const stream = require('fs').createReadStream('./README.md');
const stapled = eventStapler(stream)
.on('data', onData)
.once('end', onEnd, null, stream)
.once('error', onError, null, stream)
.once('close', onClose)
.releaseAfter('close')
.releaseAfter('error');
function onData(chunk) {
// process data
console.log('CHUNK', chunk);
}
function onEnd(stream) {
// handler is called with additional parameters provided at point of binding
console.log('END');
stapled.release(); // manually remove staple. all event handlers released.
}
function onClose() {
console.log('CLOSE');
}
function onError(err) {
// handle error.
// don't worry about cleaning up old event listeners
console.log('ERROR', err);
}
FAQs
Event Stapler is a utility to attach a collection of event listeners to an emitter in such a way that it is very easy to unbind them all later. All events attached via a staple can be detached in a single call, or after a specific event is fired by the e
The npm package eventstapler receives a total of 4 weekly downloads. As such, eventstapler popularity was classified as not popular.
We found that eventstapler 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.