From 8fc5c0f94b340efb05a286072916b396fa4f2371 Mon Sep 17 00:00:00 2001 From: Rafal Szymanski Date: Thu, 24 Mar 2016 12:31:22 -0400 Subject: [PATCH 1/6] Imaginary 13's were twice in the code --- index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/index.js b/index.js index 592f0705..8c6daf92 100644 --- a/index.js +++ b/index.js @@ -75,11 +75,6 @@ function is(x) { "דרייַצן", // Yiddish, "kumi na tatu", // Swahili - //Imaginary 13's - "13+0i", - "13 + 13i", - "13i", - // Thirteen pronunciation "θərˈtiːn" ] From 892a59012284b04e9c97039140661ca9d6b89572 Mon Sep 17 00:00:00 2001 From: Gytis Daujotas Date: Thu, 24 Mar 2016 16:39:09 +0000 Subject: [PATCH 2/6] Fixed tests Now only 7 tests fail. Revolutionary! --- index.js | 10 +++++----- test.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 592f0705..918d1a8e 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,7 @@ function is(x) { 1101, // Binary 13 "XIII", // Roman numeral 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 "rem hadley", // And because he's 13 @@ -23,7 +23,7 @@ function is(x) { "Dr. Remy Beauregard Hadley", // Why not 13's real name?! // Imaginary 13's - "13+0i", + "13+0i", "13 + 13i", "13i", @@ -38,7 +38,7 @@ function is(x) { "trinaest", // Croatian "tretten", // Danish / Norwegian "kolmteist", // Estonian - "שלוש עשרה", // Hebrew + "שלוש עשרה", // Hebrew "labintatlo", // Filipino "kolmetoista", // Finnish "treize", // French @@ -74,12 +74,12 @@ function is(x) { "tri ar ddeg", // Welsh "דרייַצן", // Yiddish, "kumi na tatu", // Swahili - + //Imaginary 13's "13+0i", "13 + 13i", "13i", - + // Thirteen pronunciation "θərˈtiːn" ] diff --git a/test.js b/test.js index d89d3e48..c5d8fe05 100644 --- a/test.js +++ b/test.js @@ -1,5 +1,5 @@ const tap = require('tap'); -const isThirteen = require('./'); +const is = require('./'); tap.equal(is(13).thirteen(), true); @@ -53,7 +53,7 @@ tap.equal(is("tiga belas").thirteen(), true); // Malay tap.equal(is("арван").thirteen(), true); // Mongolian tap.equal(is("trzynaście").thirteen(), true); // Polish tap.equal(is("treze").thirteen(), true); // Portoguese -tap.equal(is("ਤੀਹ").thirteen(), true); // Punjabi +tap.equal(is("ਤੀਹ").thirteen(), true); // Punjabi tap.equal(is("treisprezece").thirteen(), true); // Romanian tap.equal(is("тринадцать").thirteen(), true); // Russia tap.equal(is("trinásť").thirteen(), true); // Slovak From 5349de4cf89bce5c9ac93b30712a27d435ea184f Mon Sep 17 00:00:00 2001 From: Cory Binnersley Date: Thu, 24 Mar 2016 09:55:21 -0700 Subject: [PATCH 3/6] adds square.of 13 --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.js b/index.js index 918d1a8e..8ca66923 100644 --- a/index.js +++ b/index.js @@ -109,6 +109,13 @@ function is(x) { } } }, + square: { + of: { + thirteen: function() { + return x === 169; + } + } + }, within: function(y) { return { of: { From f290312afdfdc1464bd81fb5bcd85cc155d628ab Mon Sep 17 00:00:00 2001 From: Samuel Gaus Date: Thu, 24 Mar 2016 16:55:33 +0000 Subject: [PATCH 4/6] Support nonorthogonal Yiddish In modern Yiddish the "niqqud" (diacritical marks) are optional (ref http://blogs.yiddish.forward.com/yiddish-with-an-aleph/) We shouldn't miss this vital opportunity to catch a 13. --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 918d1a8e..e6bd1925 100644 --- a/index.js +++ b/index.js @@ -73,6 +73,7 @@ function is(x) { "تیرہ", // Urdu "tri ar ddeg", // Welsh "דרייַצן", // Yiddish, + "דרייצן", // Yiddish (without diacritics), "kumi na tatu", // Swahili //Imaginary 13's From 5364859011e142a0aa23db0d83dbf2a37213159c Mon Sep 17 00:00:00 2001 From: Sam Gaus Date: Thu, 24 Mar 2016 16:57:50 +0000 Subject: [PATCH 5/6] Adds test for nonorthogonal Yiddish --- test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test.js b/test.js index c5d8fe05..bebfe8ef 100644 --- a/test.js +++ b/test.js @@ -66,4 +66,5 @@ tap.equal(is("тринадцять").thirteen(), true); // Ukrainian tap.equal(is("تیرہ").thirteen(), true); // Urdu tap.equal(is("tri ar ddeg").thirteen(), true); // Welsh tap.equal(is("דרייַצן").thirteen(), true); // Yiddish +tap.equal(is("דרייצן").thirteen(), true); // Yiddish (without diacritics), tap.equal(is("kumi na tatu").thirteen(), true); // Swahili From 1f6d0ba0181fab4ab087792f7002984eb1dd77f5 Mon Sep 17 00:00:00 2001 From: Rafal Szymanski Date: Thu, 24 Mar 2016 12:31:22 -0400 Subject: [PATCH 6/6] Imaginary 13's were twice in the code --- index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/index.js b/index.js index c09db36e..bf9f4d3a 100644 --- a/index.js +++ b/index.js @@ -76,11 +76,6 @@ function is(x) { "דרייצן", // Yiddish (without diacritics), "kumi na tatu", // Swahili - //Imaginary 13's - "13+0i", - "13 + 13i", - "13i", - // Thirteen pronunciation "θərˈtiːn" ]