![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
uevents.js
Advanced tools
Readme
Micro events library for javascript. It works in the browser and has support
for CommonJS and AMD loading built in. It can also be used on the server
through node.js
, but for most applications usage of the native
events
API should suffice.
This library has no external dependencies and weights less than 1kb when minified and gziped.
Complete API documentation is available here.
You can create a new uevents object on which you can register callbacks for named events, and unregister callbacks for named events, and trigger events.
// create new uevents object
var obj = uevents.create();
// register callback for signal receiving two parmeters
obj.on('signal', function (a, b) {
console.log("a: " + a + ", b: " + b);
});
// trigger signal with 'A' and 'B'
// should print "a: A, b: B"
obj.trigger('signal', 'A', 'B');
// trigger signal with 5 and 6
// should print "a: 5, b: 6"
obj.trigger('signal', 5, 6);
// remove all callbacks for 'signal'
obj.off('signal');
// trigger signal 'A' and 'B'
// nothing happens, no callbacks registered
obj.trigger('signal', 'A', 'B');
You can also extend an existing object to allow it to emit and receive events using the same API.
var obj = new ComplicatedCustomObject();
uevents.create(obj);
// register callback for 'signal'
obj.on('signal', function () {
console.log('signal emitted');
});
// trigger callbacks for 'signal'
obj.trigger('signal');
FAQs
Micro events library for javascript. It works in the browser and has support for CommonJS and AMD loading built in. It can also be used on the server through `node.js`, but for most applications usage of the native `events` API should suffice.
The npm package uevents.js receives a total of 1 weekly downloads. As such, uevents.js popularity was classified as not popular.
We found that uevents.js 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.