
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
async-glob-events
Advanced tools
Event emitter with glob support on event names and asynchronous listeners
Event emitter with glob support on event names and asynchronous listeners, for node and the browser
Repository: https://github.com/mantoni/async-glob-events.js
emit
and receive asynchronous
errors and return values from listenersvar AsyncEmitter = require('async-glob-events').AsyncEmitter;
var asyncEmitter = new AsyncEmitter();
asyncEmitter.on('add', function (a, b, callback) {
setTimeout(function () {
callback(null, a + b);
}, 100);
});
asyncEmitter.emit('add', 3, 4, function (err, value) {
assert.equal(value, 7);
});
Listeners may also return value immediately:
asyncEmitter.on('add', function (a, b) {
return a + b;
});
This makes it possible to change an implementation from synchronous to asynchronous without modifying the caller.
The callback passed to emit
is only invoked once all invoked listeners
returned.
The API is identical to glob-events with these additions:
emit({ event : 'name', allResults : true }, ...)
may be used to receive an
array with all non-undefined
return values of all listenersthis.callback()
may be used in listeners to obtain a callbacknpm install async-glob-events
Use Browserify to create a standalone file.
MIT
0.1.0
FAQs
Event emitter with glob support on event names and asynchronous listeners
The npm package async-glob-events receives a total of 5 weekly downloads. As such, async-glob-events popularity was classified as not popular.
We found that async-glob-events 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
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.