PATH:
usr
/
local
/
lib
/
node_modules
/
bower
/
lib
/
node_modules
/
bower-config
/
node_modules
/
mout
/
src
/
function
define(['../time/now'], function (now) { /** */ function throttle(fn, delay){ var context, timeout, result, args, diff, prevCall = 0; function delayed(){ prevCall = now(); timeout = null; result = fn.apply(context, args); } function throttled(){ context = this; args = arguments; diff = delay - (now() - prevCall); if (diff <= 0) { clearTimeout(timeout); delayed(); } else if (! timeout) { timeout = setTimeout(delayed, diff); } return result; } throttled.cancel = function(){ clearTimeout(timeout); }; return throttled; } return throttle; });
[-] bind.js
[edit]
[-] throttle.js
[edit]
[-] partial.js
[edit]
[-] awaitDelay.js
[edit]
[-] series.js
[edit]
[-] memoize.js
[edit]
[+]
..
[-] debounce.js
[edit]
[-] timeout.js
[edit]
[-] times.js
[edit]
[-] wrap.js
[edit]
[-] func.js
[edit]
[-] identity.js
[edit]
[-] constant.js
[edit]
[-] makeIterator_.js
[edit]
[-] compose.js
[edit]
[-] after.js
[edit]
[-] prop.js
[edit]