1.1.3 • Published 1 year ago

@harexs/emitter v1.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

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");