snorkel:事件调度程序

时间:2024-05-23 21:52:58
【文件属性】:

文件名称:snorkel:事件调度程序

文件大小:6KB

文件格式:ZIP

更新时间:2024-05-23 21:52:58

web beach JavaScript

呼吸管 :person_swimming: 事件调度程序 用法 import EventDispatcher from 'snorkel' // Listen for an event EventDispatcher . on ( 'welcome' , ( data ) => { console . log ( 'The welcome event happened with ' + data ) } ) function isReady { console . log ( 'The thing is ready' ) } // Listen for an event only once EventDispatcher . once ( 'ready' , isReady ) // Emit an event EventDispatcher . emit ( 'welcome' , 'emit' , 'as'


【文件预览】:
snorkel-master
----.gitignore(531B)
----package.json(2KB)
----src()
--------snorkel.js(1024B)
----webpack.config.js(555B)
----README.md(1KB)
----gulpfile.babel.js(2KB)
----.npmignore(624B)
----karma.config.js(1KB)
----test()
--------snorkel.spec.js(2KB)

网友评论