Hacker News new | ask | show | jobs
by tastroder 2555 days ago
This one year old reddit discussion [1] seems to indicate that the package was used in another, pretty popular and more complex, package by the same author. The dependency doesn't look current anymore but it might be downloads of previous versions.

As for justification and usage I couldn't tell you, apparently it was only used once in that whole codebase anyway (also according to that thread).

[1] https://www.reddit.com/r/programming/comments/886zji/why_has...

1 comments

Even worse: it is only used one time in the entire code-base, and that one time was to check whether or not a value returned by the string length function was odd.

What.... why.... the only concievable point of a package like this is that at least it does the kind of type-checking needed to compensate for JavaScripts weak typing system, but why do you need to check the type of String.length?! Do you really think it's going to start spitting anything other than a positive integer? Fucking hell....

0 is not a positive number.
Fair enough, "non-negative integers" then.