4 ms·
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 bo
by riebschlager 11y ago
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
- gkoberger 11y agoI think that's the point the parody is making. A simple "piece" of code can have thousands of edge cases that a normal developer doesn't think about. That's the advantage of the UNIX-style "everything does one thing and does it well" philosophy that Node mirrors.
- justinlardinois 11y agoYou could just as easily read it as a comment on overengineering.
- tluyben2 11y agoThat's what I did anyway...
- dhatch387 11y ago> tap.equal(is("B").thirteen(), true); // B looks like 13
- dTal 11y agoUnless it's hidden by obfuscation, judging by the source code I think that test actually fails, and hilariously only lowercase 'b' works.
- acrooks 11y agoNah, they do case insensitive matching: https://github.com/jezen/is-thirteen/blob/master/index.js#L115 https://github.com/jezen/is-thirteen/blob/master/index.js#L1...
- deleted 11y ago[deleted]
- 1QAm1 11y agoI think that either [1] That IS the joke, or [2] the issues are where the good jokes lie. Maybe the real joke is in the commits?
- riebschlager 11y agoIt's pretty much brilliant top to bottom. I starred the hell out of this repo.
- z1mm32m4n 11y agoI'm imagining someone repeatedly unstarring the repo just to re-star it again.
- PeCaN 11y agohttps://github.com/jezen/is-thirteen/commit/b112acdf2d64f13d6fcf57ac40e081d5d0a6b96a https://github.com/jezen/is-thirteen/commit/b112acdf2d64f13d... This whole thing is hilarious.
- deleted 11y ago[deleted]