1.0.1 • Published 9 months ago

@harexs/emitter v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months 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
emitter.once("harexs"); //remove itself after use emit

emitter.emit("harexs", "whoami");

emitter.off("harexs");
s;