From: Iskren Chernev Date: Tue, 17 Sep 2013 07:14:19 +0000 (-0700) Subject: Make jshint happy X-Git-Tag: 2.3.0~28^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F913%2Fhead;p=thirdparty%2Fmoment.git Make jshint happy --- diff --git a/moment.js b/moment.js index 7cc2889da..0667c22ac 100644 --- a/moment.js +++ b/moment.js @@ -987,7 +987,7 @@ }); // Handle stuff after last formatting token. - if (non_token_start != config._f.length) { + if (non_token_start !== config._f.length) { regexp += regexpEscape(unescapeFormat(config._f.substring(non_token_start))); } regexp = new RegExp('^' + regexp + '$'); diff --git a/test/moment/create.js b/test/moment/create.js index 62c922c8d..2697c83b1 100644 --- a/test/moment/create.js +++ b/test/moment/create.js @@ -491,7 +491,7 @@ exports.create = { test.done(); }, - "strict parsing" : function(test) { + "strict parsing" : function (test) { test.expect(10); test.equal(moment("2012-05", "YYYY-MM", true).format("YYYY-MM"), "2012-05", "parse correct string"); test.equal(moment(" 2012-05", "YYYY-MM", true).isValid(), false, "fail on extra whitespace");