diff --git a/.gitignore b/.gitignore index daf97ad3..939186ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ coverage/ .nyc_output/ node_modules/ -npm-debug.log \ No newline at end of file +npm-debug.log diff --git a/index.js b/index.js index 5cdc8661..61581545 100644 --- a/index.js +++ b/index.js @@ -9,12 +9,13 @@ var noop = require('noop3'); function is(x) { // this line calls the noop function noop(); - + + // Every element should be lower case var thirteenStrings = [ - '1101', // Binary 13 + 1101, // Binary 13 "xiii", // Roman numeral 13 - "0xD", // Hex 13 - + "0xd", // Hex 13 + "https://scontent.cdninstagram.com/hphotos-xtf1/t51.2885-15/s320x320/e35/12237511_444845689040315_1101385461_n.jpg", // Just because we can "https://www.youtube.com/watch?v=pte3Jg-2Ax4", // Thirteen by Big Star "https://www.youtube.com/watch?v=33Kv5D2zwyc", // The best Johny Cash's song @@ -67,8 +68,8 @@ function is(x) { "dreizehn", // German "drizäh", // Swiss German "wa’maH wej" // Klingon - "שלוש עשרה", // Hebrew - "तेरह", //Hindi + "שלוש עשרה", // Hebrew + "तेरह", //Hindi "tizenhárom", // Hungarian "trí déag", // Irish "tredici", // Italian @@ -121,6 +122,12 @@ function is(x) { }, roughly: { thirteen: function() { + for (var i = 0, len = thirteenStrings.length; i < len; i++) { + if (('' + x).toLowerCase().indexOf(('' + thirteenStrings[i])) > -1) { + return true; + } + } + return x >= 12.5 && x < 13.5; } },