Skip to content

Instantly share code, notes, and snippets.

@grippado
Last active August 29, 2015 14:13
Show Gist options
  • Save grippado/27d41b29bcec2d80c455 to your computer and use it in GitHub Desktop.
Save grippado/27d41b29bcec2d80c455 to your computer and use it in GitHub Desktop.
var debcomp = (function () {
'use strict';
var timeWin = 500;
var tout;
var debcomp = function (arg1, arg2) {
// insira aqui a logica
};
return function() {
var context = this;
var args = arguments;
clearTimeout(tout);
tout = setTimeout(function(){
debcomp.apply(context, args);
}, timeWin);
};
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment