@harexs/emitter
v1.1.3
Published
a simple event emitter
Downloads
2
Maintainers
Readme
harexs-emitter
a simple event emitter
Install
$ npm install @harexs/emitter
Usage
import harexsEmitter from "@harexs/emitter";
const emitter = harexsEmitter();
emitter.on("harexs", (e) => console.log(e));
//or by once
emitter.once("harexs"); //remove itself after use emit
emitter.emit("harexs", "whoami");
// remove emit
emitter.off("harexs");