changes in order to satisfy jshint

[L120:C18] Wrap the /regexp/ literal in parens to disambiguate the slash operator.
          return /^application\/json/.test(xhr.contentType());
[L307:C27] Expected '===' and instead saw '=='.
      if (requests.length == 0) return [];
[L307:C33] Expected '{' and instead saw 'return'.
      if (requests.length == 0) return [];
[L318:C31] Expected '===' and instead saw '=='.
          if (requests[i].url == url_to_match) {
This commit is contained in:
Sven Uhlig 2014-07-13 00:53:18 +02:00
parent f95a009ffe
commit ce30728c98

View File

@ -117,7 +117,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
var defaults = [
{
test: function(xhr) {
return /^application\/json/.test(xhr.contentType());
return (/^application\/json/).test(xhr.contentType());
},
parse: function jsonParser(paramString) {
return JSON.parse(paramString);
@ -304,7 +304,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
};
this.filter = function(url_to_match) {
if (requests.length == 0) return [];
if (requests.length === 0) {
return [];
}
var matching_requests = [];
for (var i = 0; i < requests.length; i++) {
@ -315,7 +317,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
url_to_match(requests[i])) {
matching_requests.push(requests[i]);
} else {
if (requests[i].url == url_to_match) {
if (requests[i].url === url_to_match) {
matching_requests.push(requests[i]);
}
}