event-loop:事件循环抽象

时间:2021-04-30 14:32:02
【文件属性】:
文件名称:event-loop:事件循环抽象
文件大小:6KB
文件格式:ZIP
更新时间:2021-04-30 14:32:02
JavaScript 沃尔特雷沃事件回路 事件循环抽象。 安装 $ npm install --save voltrevo-event-loop 用法 目前,该程序包基本上实现了setTimeout而不使用全局事件循环。 控制权以.run()和.runNext()的形式提供给您。 var EventLoop = require ( 'voltrevo-event-loop' ) ; var el = EventLoop ( ) ; el . post ( function ( ) { console . log ( 'a' ) ; } , 100 ) ; el . post ( function ( ) { console . log ( 'b' ) ; } ) ; el . post ( function ( ) { console . log ( 'c' ) ; } ) ; // No ou
【文件预览】:
event-loop-master
----.travis.yml(57B)
----.eslintrc(317B)
----package.json(891B)
----test()
--------index.js(2KB)
----gulpfile.js(1KB)
----LICENSE(1KB)
----.gitignore(22B)
----lib()
--------dethisify.js(537B)
--------index.js(1KB)
----README.md(2KB)
----.editorconfig(171B)
----.gitattributes(12B)

网友评论