Skip to content

Instantly share code, notes, and snippets.

View Tako's full-sized avatar

Maxime Gauché-Daumet Tako

View GitHub Profile
module.exports = {
'plugins': [
'react'
],
'ecmaFeatures': {
'jsx': true
},
'env': {
'browser': true,
'node': true,
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};