@katrieltsepelevish/emtr
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Emtr

A lightweight event emitter for Javascript

Dependecy Installation

yarn:

yarn add @katrieltsepelevish/emtr

Usage

import Emtr from '@katrieltsepelevish/emtr';

const emitter = new Emtr();

const cb = emitter.handle('test', () => console.log('fired!'));

emitter.fire('test');

const num = emitter.count('test');
console.log(num);

emitter.remove('test', cb);

emitter.clear();

Publish

Make sure to bump the version before publishing

yarn build
npm publish --access=public

Readme

Keywords

none

Package Sidebar

Install

npm i @katrieltsepelevish/emtr

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

8.21 kB

Total Files

18

Last publish

Collaborators

  • katrieltsepelevish