1.1.2 • Published 3 years ago

event-helper v1.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

event-helper

EventHelper support nodejs and browser environment

my love

Installation

yarn add event-helper

Usage

//in js
import EventHelper  from 'event-helper' 

const eventInstance=EventHelper.create()

API

on(name,action)

add event

off(name,action?)

remove event

once(name,action)

add evnet for one time

emit(name:string|string[])

emit event by name or name array

has(name:string)

check event name exists

first(name:string,action)

remove events of name
then add action of the same name

create()

create a instance of event-helper

this all you can use functions,thanks

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.1

7 years ago