
Jezen/is-thirteen: Check if a number is equal to 13 - joeyyang
https://github.com/jezen/is-thirteen
======
riebschlager
My first reaction was, "Haha. That's fun code-as-parody."

Then I looked at the unit tests. [1] Now my reaction is more like, "Your
commitment to this bit is both admirable and slightly disturbing."

[1] [https://github.com/jezen/is-
thirteen/blob/master/test.js](https://github.com/jezen/is-
thirteen/blob/master/test.js)

~~~
dhatch387
> tap.equal(is("B").thirteen(), true); // B looks like 13

~~~
dTal
Unless it's hidden by obfuscation, judging by the source code I think that
test actually fails, and hilariously only lowercase 'b' works.

~~~
acrooks
Nah, they do case insensitive matching: [https://github.com/jezen/is-
thirteen/blob/master/index.js#L1...](https://github.com/jezen/is-
thirteen/blob/master/index.js#L115)

------
gizmo686
This is a great example of why it is important to use modules. If I were to
try implementing this myself, I might have thought to check for the Chinese
string "十三", but I doubt I would have known to check for the uppercase version
of the Chinese string "拾叄".

More seriously, does anyone know what "uppercase" means in Chinese? Do they
literally have two (seemingly unrelated) forms for each of their characters?

~~~
xiaq
Only numerals have upper cases to prevent tampering. For example, you can
alter 一(one) to 十(ten) pretty easily, but not 壹 to 拾.

~~~
PeCaN
Oh, that actually makes a lot of sense. That also explains why they're used
for checkwriting. Thanks!

------
labster
Thank goodness they have a Code of Conduct for contributors. The people behind
this project wouldn't want to put other people down.

~~~
cmwelsh
They are very proud of their Code of Conduct and Kindness (COCK).

~~~
joshrotenberg
They should be. It's small but effective, proving once again that size doesn't
matter.

------
andrewstuart2
And for the Java/Enterprise equivalent:

[https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...](https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition)

~~~
geodel
I think FizzBuzz is far more complex problem than this isThirteen. This
FizzbuzzEE solution shows where Java truly shines: powerful dependency
management, industry leading design patterns. My only wish is to add parallel
streams, lambda and other latest Java 8 feature support.

------
barlo
This native version has much better performance:
[https://github.com/taganaka/is-thirteen-
native](https://github.com/taganaka/is-thirteen-native)

------
ominous
We have reached peak npm.

------
rcthompson
Half the issues suggest the use of actual NPM modules, and I'm at a loss to
tell which ones are jokes. For example: "Replace noop3 with noop4 (also keep
an eye out for noop5)" [https://github.com/jezen/is-
thirteen/issues/151](https://github.com/jezen/is-thirteen/issues/151)

------
neeleshs
tap.equal(is('Olivia Wilde').thirteen(), true);

Fellow House fan!

------
gardnr
commit 512813f

Added Klingon translation and and test for word "thirteen"

[https://github.com/jezen/is-
thirteen/commit/512813f](https://github.com/jezen/is-thirteen/commit/512813f)

------
daveloyall
177 commits.

~~~
daveloyall
Favorite so far: "Remove imgur dependency"

------
minimaxir
For more 13 fun, check of the Magic: the Gathering card Triskaidekaphobia.
(Specifically, counts in the art and the rules text.)

[http://media.wizards.com/2016/aksdjciawolkcc0_soi/en_CMrxVcz...](http://media.wizards.com/2016/aksdjciawolkcc0_soi/en_CMrxVczUb3.png)

~~~
Pxtl
Isn't MTG a 1v1 game generally? "Each player"?

~~~
drdeca
I think it depends on the format, so cards have to handle the case of many
players.

I think there are quite a number of many player formats actually.

Like, in one, some number of packs a cracked, and they are passed around in a
circle, each person picking one card, until everyone has a deck, and then they
play.

Iirc. (Haven't played it myself.)

------
dboreham
Few days too early?

I think it would be better done with 11 though.

"Check if this one goes to..."

------
Nadya
Seems like a spin off of five.js

[https://github.com/jackdcrawford/five](https://github.com/jackdcrawford/five)

~~~
1QAm1
So it seems, and by years.

------
ldom22
This library is just what I need for my side project. Hopefully it will be
taken up as a standard for other numeric comparisons.

------
wund
Does this work on IE7?

------
mchahn
I thought this was a parody on pad-left.

------
nthcolumn
unit test for morse code: thirtees?

------
smegel
If he's going to troll like this, shouldn't it have 13 obscure dependencies as
well?

------
1QAm1
Can't someone do this in about 4 characters of Perl?

~~~
PeCaN
Yes, but the "could be interpreted as" operator, colloquially "sleep equals"
is pretty obscure and not recommended for production: "thirteen" ~_~ 13

