Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
microevent2
Advanced tools
Readme
microevent2.js is a event emitter library which provides the [observer pattern](http: //en.wikipedia.org/wiki/Observer_pattern) to javascript objects.
It works on ES6, node.js and browser. It is a single.js file containing
< a href = "https://raw.githubusercontent.com/sun2rise/microevent2/master/dist/microevent2.js" >
You need a single file microevent2.js. Include it in a webpage via the usual script tag.
<script src="microevent2.js"> </script>
var microevent2 = new MicroEvent2();
microevent2.on('some-event', someCallback);
microevent2.emit('some-event');
or
import MicroEvent2 from 'MicroEvent2';
let Object = function () {
MicroEvent2.mixin(this);
this.emit('ev.name', data);
}
or
var Microevent2 = require('microevent2')
Subscribe to an event
event
- the name of the event to subscribe tocallback
- the function to call when event is emittedSubscribe to an event only once
event
- the name of the event to subscribe tocallback
- the function to call when event is emittedUnsubscribe from an event or all events.
event
- the name of the event to unsubscribe fromcallback
- the function used when binding to the eventTrigger a named event
event
- the event name to emitarguments...
- any number of arguments to pass to the event subscribersPush events downstream from the handler to another
eventEmitter
- the event emitter to pipe (to emit to)Unpipe events to the previously piped event emitter
eventEmitter
- the event emitter to unpipeMixin will delegate all microevent2 function in the destination object
destObject
- the object which will support microevent2For compatibility, see on
For compatibility, see off
For compatibility, see emit
see inside test
folder
FAQs
Event emitter tiny library
We found that microevent2 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.