throttleme:简单的节流

时间:2021-05-11 19:48:41
【文件属性】:
文件名称:throttleme:简单的节流
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-11 19:48:41
JavaScript 油门 用法 var throttle = require ( 'throttleme' ) var now = Date . now ( ) var fast = function ( /* whatever args */ ) { console . log ( Date . now ( ) - now ) } var slow = throttle ( fast , 200 ) // Note: you won't get exactly 0, 200, etc, because this module // uses setTimeout, which is inaccurate (and this module isn't that sophisticated) // Expect something like ~20ms accuracy slow ( ) // -> 0
【文件预览】:
throttleme-master
----test()
--------index.js(1KB)
----.gitignore(13B)
----index.js(1000B)
----readme.md(540B)
----package.json(767B)

网友评论