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:
Santhosh Thottingal
2012-09-04 16:01:05 +05:30
parent da89d0088b
commit 298c91a68f
7 changed files with 25 additions and 27 deletions

View File

@@ -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 ) );