这是indexloc提供的服务,不要输入任何密码
Skip to content
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
coverage/
.nyc_output/
node_modules/
npm-debug.log
npm-debug.log
19 changes: 13 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
},
Expand Down