MDL-32843 import YUI 3.5.1
[moodle.git] / lib / yui / 3.5.1 / build / yui-throttle / yui-throttle-min.js
blob4abb7e4b009b8bc863d1de569a40d90e499f7ed0
1 /*
2 YUI 3.5.1 (build 22)
3 Copyright 2012 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
6 */
7 YUI.add("yui-throttle",function(a){
8 /*! Based on work by Simon Willison: http://gist.github.com/292562 */
9 a.throttle=function(c,b){b=(b)?b:(a.config.throttleTime||150);if(b===-1){return(function(){c.apply(null,arguments);});}var d=a.Lang.now();return(function(){var e=a.Lang.now();if(e-d>b){d=e;c.apply(null,arguments);}});};},"3.5.1",{requires:["yui-base"]});