Skip to content

Gu1st/emitter

Repository files navigation

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

About

a simple event emitter

Resources

License

Stars

Watchers

Forks

Packages

No packages published