onstop:在给定时间间隔内检测重复事件何时停止发生

时间:2021-07-10 15:33:28
【文件属性】:
文件名称:onstop:在给定时间间隔内检测重复事件何时停止发生
文件大小:3KB
文件格式:ZIP
更新时间:2021-07-10 15:33:28
JavaScript 停站 在给定的时间间隔内检测重复发生的事件何时停止发生。 一个很好的例子是 用法 var onstop = require ( 'onstop' ) ; var someEventEmitter = getEventEmitterSomehow ( ) ; var fn = onstop ( 3000 , function ( ) { // if the event stops for 3 seconds this function gets called. console . log ( 'The event stopped happening.' ) ; } ) ; someEventEmitter . on ( 'myevent' , fn ) ; 如果事件停止发生,然后开始,然后再次停止,该函数将被调用两次。 执照 麻省理工学院
【文件预览】:
onstop-master
----.gitignore(13B)
----package.json(641B)
----.travis.yml(95B)
----index.js(369B)
----test.js(800B)
----LICENSE.txt(1KB)
----README.md(697B)

网友评论