Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
ngraph.events
Advanced tools
Small and powerful eventing in node and browser
var eventify = require('ngraph.events');
var yourObject = {}; // any javascript object
eventify(yourObject);
// now any object can listen to events from your object
yourObject.on('beep', function(name) { console.log('Hello ' + name); });
// and you can fire events from your object:
yourObject.fire('beep', 'World!'); // prints 'Hello World!'
// stop listen to events:
yourObject.off('beep');
More advanced examples:
var eventify = require('ngraph.events');
var yourObject = eventify({});
// Pass context to event handler as last argument:
yourObject.on('beep', function () { console.log(this === yourObject); }, yourObject);
yourObject.fire('beep'); // prints true;
// Pass additional arguments to fire:
var onBop = function (x, y) { console.log(x + y); };
yourObject.on('bop', onBop);
yourObject.fire('bop', 40, 2); // prints 42;
// Remove given event handler for 'bop' event
yourObject.off('bop', onBop);
// Remove all event listeners from your object:
yourObject.off();
I wanted a light-weight eventing library, so I built this.
With npm do:
npm install ngraph.events
BSD 3-Clause
FAQs
Basic events supoort for ngraph.js
The npm package ngraph.events receives a total of 76,939 weekly downloads. As such, ngraph.events popularity was classified as popular.
We found that ngraph.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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.