1.1.5 • Published 6 years ago

cust-event v1.1.5

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

cust-event

one Custom-event libs ## 一款支持自定义事件的工具函数模块

  • 支持es6 Commonjs模块化引入

Install

import cust from 'cust-event'

OR

let cust =  require('cust-event')

Usage

绑定事件

cust.on('event-name',function(){
    //callback
})

触发事件

cust.trigger('event-name',function(){
    //callback
})

取消事件

cust.off('event-name',function(){
    //callback
})

只触发一次

cust.one('event-name',function(){
    //callback
})
1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago