Emitter

emitter

Author: Firede(firede@firede.us)
Example

var emitter = new Emitter();
emitter.on('foo', function(value) {
    console.log(value);
 });
 // console.log: 'test'
 emitter.emit('foo', 'test');

Emitter ⏏

Kind: Exported class

new Emitter()

Create a emitter instance

Emitter.mixin(obj) ⇒ Object

将Emitter混入目标对象

Kind: static method of Emitter
Returns: Object - 混入Emitter后的对象

Param Type Description
obj Object 目标对象

results matching ""

    No results matching ""