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.
event-actions
Advanced tools
Application level event and action emitter. Used to connect different components to each other by using common emitter for events and actions.
Events are used for notify listeners when something happens.
Actions are used to trigger things in other components.
npm install event-actions
// get default EventHub instance
var actions = require('event-actions')();
// listen 'click' event from component A
actions.onEvent('A:click', function(button) {
console.log('Component A was clicked with button ' + button);
});
// emit event
actions.emitEvent('A:click', 'Button 1');
// listen 'process' action
actions.onAction('B:process', function(a, b) {
console.log('Processing values', a + b);
});
// emit action
actions.emitAction('B:process', 3, 5);
Namespacing actions and events is crusial, expecially when number of connected components grows.
In the future namespacing can be used to simplify things, such as removing all listeners from specific component.
FAQs
Application level event and action emitter
We found that event-actions 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.