1.1.2 • Published 5 years ago
event-helper v1.1.2
event-helper
EventHelper support nodejs and browser environment

Installation
yarn add event-helperUsage
//in js
import EventHelper from 'event-helper'
const eventInstance=EventHelper.create()API
on(name,action)
add eventoff(name,action?)
remove eventonce(name,action)
add evnet for one timeemit(name:string|string[])
emit event by name or name arrayhas(name:string)
check event name existsfirst(name:string,action)
remove events of name
then add action of the same namecreate()
create a instance of event-helperthis all you can use functions,thanks