0.1.3 • Published 3 years ago

tiny-eventbus v0.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

easy-eventbus

Tiny eventbus lib for typescript

install

yarn add tiny-eventbus

use

import eventbus from 'tiny-eventbus'
eventbus.on('test', (params) => {
  console.log(params)
})

eventbus.emit('test', {
  value: 'hello',
})

api

on : subscribe an event

once: subscribe an event for once

emit : publish an event

off: unsubscribe an event

removeAll: remove add events

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago