赛事
用于AssemblyScript的EventEmitter
特征
没有依赖
同构
适用于Node.js /浏览器/ Wasmer
代码小
安装
~ npm install as-events
用法
import { EventEmitter } from 'as-events'
const emitter = new EventEmitter ( )
emitter . on ( 'event' , ( data ) => {
//...
} )
emitter . emit ( 'event' , 'Hello Event Emitter!' )
1