Genuinely Useful Repos — Episode #13

This from Jezen Thomas, an npm package to check if a number is equal to 13.
Ridiculously useful, especially if you are a huge Taylor Swift fan.
Or are building elevator controls in the US.
Maybe you like gambling in Italy? Or have Triskaidekaphobia? This, very definitely, is the repo for you!
The syntax is clear and elegant:
is(13).thirteen(); // true
is(12.8).roughly.thirteen(); // true
is(6).within(10).of.thirteen(); // true
is(2003).yearOfBirth(); // true

// check your math skillz
is(4).plus(5).thirteen();      // false
is(12).plus(1).thirteen();    // true
is(4).minus(12).thirteen();    // false
is(14).minus(1).thirteen();    // true
is(1).times(8).thirteen();    // false
is(26).divideby(2).thirteen();  //true
and I look forward to embedding this in all my projects.

Comments

Popular posts from this blog

Cannonball Tree!

Erlang, Binaries, and Garbage Collection (Sigh)

Visualizing Prime Numbers