@harexs/emitter
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

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

Package Sidebar

Install

npm i @harexs/emitter

Weekly Downloads

18

Version

1.1.3

License

MIT

Unpacked Size

15.7 kB

Total Files

10

Last publish

Collaborators

  • gu1st