0.0.1 • Published 8 years ago
hbq-event-helper v0.0.1
event-helper
EventHelper support nodejs and browser environment

Installation
yarn add event-helperUsage
//in ts
import { EventHelper } from 'event-helper'
//in js
const { EventHelper } = require('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
0.0.1
8 years ago