Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Simple events for simple objects. Three methods to rule'em all: `on`, `off`, `trigger`.
Simple events for simple objects. Three methods to rule'em all: .on
, .off
, .trigger
. Lots of fun.
npm install --save got-events
Three options:
var evHandler = require('got-events')();
require('got-events').extend(simpleObject);
Optionally preserving old attributes:
require('got-events').extend(simpleObject, true);
var evHandler = require('got-events').singleton;
.on(eventName, callback)
Adds a callback to an event.
eventName
: String or Array of strings.callback
: Function..on(eventName, callbackId, callback)
Adds a callback to an event, identified.
eventName
: String or Array of strings.callbackId
: String.callback
: Function..off(eventName)
Clears the event's callback list.
eventName
: String or Array of strings..off(eventName, callback)
Removes a callback from an event.
eventName
: String or Array of strings.callback
: Function..off(eventName, callbackId)
Removes an identified callback from an event.
eventName
: String or Array of strings.callbackId
: String or Array of strings..trigger(eventName, data)
Triggers an event with err = null
.
eventName
: String or Array of strings.data
: Anything..trigger(eventName, err, data...)
Triggers an event.
eventName
: String or Array of strings.err
: Error or Boolean.data...
: Anything. Every argument from here will be passed to callback.'*'
fired on every trigger.FAQs
Simple events for simple objects. Three methods to rule'em all: `on`, `off`, `trigger`.
We found that got-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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.