0.1.3 • Published 4 years ago

tiny-eventbus v0.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
4 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

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago