Misc jshint fixes
* Move the invocation into the parens that contain the function. * unescaped regex * Do not wrap function literals in parens unless they are to be immediately invoked. Change-Id: Ib3360f88fb7674af0e857d8a84a91fdac1fd8487
This commit is contained in:
@@ -37,13 +37,13 @@
|
||||
this.listen();
|
||||
};
|
||||
|
||||
var delay = function() {
|
||||
var delay = ( function() {
|
||||
var timer = 0;
|
||||
return ( function( callback, milliseconds ) {
|
||||
return function( callback, milliseconds ) {
|
||||
clearTimeout( timer );
|
||||
timer = setTimeout( callback, milliseconds );
|
||||
} );
|
||||
}();
|
||||
};
|
||||
} () );
|
||||
|
||||
LanguageFilter.prototype = {
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
},
|
||||
|
||||
escapeRegex: function( value ) {
|
||||
return value.replace( /[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&" );
|
||||
return value.replace( /[\-\[\]{}()*+?.,\\\^$\|#\s]/g, "\\$&" );
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -294,4 +294,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
} )( jQuery );
|
||||
} ( jQuery ) );
|
||||
|
||||
Reference in New Issue
Block a user