Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Manage all events in your app
npm install --save eventm
// -------------- BEHIND
const eventm = require('eventm')();
setTimeout(() => eventm.resolve('ready', 'BEHIND is ready'), 2000);
const behind = {
ready: (cb) => eventm.on('ready', cb, { onlyData: true }),
};
// -------------- AHEAD
behind.ready((data) => console.log(data));
Name | Description |
---|---|
on(string: name, function: callback = null, object: options = {}) | on listen the name evenement and take callback or Promise for the response. callback have as default parameters (err, data) |
resolve(any: data = undefined) | resolve function is used to set a success response |
reject(any: data = undefined) | reject function is used to set an error response |
On
optionsName | Default | Description |
---|---|---|
isUnique | true | true = After the response the event is removed |
onlyData | false | true = Only data is return during the callback, err is ignored |
promise | false | true = Enable Promise and on function return a Promise |
cache | false | true = Keep data in cache for a futur call with a callback |
removeCache | false | true = After the response all options and data are reset |
// -------------- BEHIND
const event = require('eventm')();
const eventChild = require('eventm')('child');
const eventParent = require('eventm')('parent');
setTimeout(() => event.resolve('ready', 'process is ready'), 1000);
setTimeout(() => eventChild.resolve('ready', 'child is ready'), 1500);
setTimeout(() => eventParent.resolve('ready', 'parent is ready'), 2000);
const behind = {
ready: (cb) => event.on('ready', cb, { onlyData: true }),
ready2: (cb) => eventChild.on('ready', cb, { onlyData: true }),
ready3: (cb) => eventParent.on('ready', cb, { onlyData: true }),
};
// -------------- AHEAD
behind.ready((data) => console.log(data));
behind.ready2((data) => console.log(data));
behind.ready3((data) => console.log(data));
FAQs
Eventm help you to manage all evenements in your code. The library store the state, data returned and the callback stack for you. Can be used like RabbitMQ in your local project.
The npm package eventm receives a total of 0 weekly downloads. As such, eventm popularity was classified as not popular.
We found that eventm 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.