Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> You really don't, but for some reason JS interns have decided that this is the optimal way to check if a number is odd.

FTFY :)



is-odd gets about two million downloads a month. is-number gets 278 million downloads a month.

I guess the interns have been very busy.


Those numbers are a little deceiving. It’s likely that those modules are upstream of a popular module or two. It’s not like they are installed by projects directly.


It's only directly depended on by 40 or so npm modules, and most of them look like beginner/joke modules like "is-ten-thousand" where they brag about being featured in a "worst npm libraries" article.

Quickly in these sorts of conversations, we're really just making fun of beginners for using dumb packages. With the popularity of Node, it makes sense to me that you can have beginners searching npm/google for how to tell if a number is odd, and for whatever reason they find is-odd or whatever.

And perhaps the idea of even collecting packages to do simple things is something fun for them. I remember having a weird maximalist attitude when I was a beginner using Rails. I'd install a Ruby gem and I could use it anywhere in my files without even importing it, usually a single line of abstraction. For some reason that appealed to me even though I could have done it myself. I think I had this idea that people writing libraries were doing things right, and I was right for tapping into them.

I think we should save our denigration for the serious, popular projects that use packages rather than the fact that beginners use them. Like, this sort of package has no business being a transitive dep of Express (it isn't) and popular Express middleware, and mainly because x-deps are security issues.


Very good points, and I think you're right on the numbers here! I went dependent spelunking - almost half of it is because is-even is a dependent (naturally) but then I didn't notice any dependents of is-even to explain it. I guess people do just google it and grab the module.

Mea culpa for the unsubstantiated assertion before.


handlebars-helpers is one of the big dependents afaik.


is-odd package.json contains

"dependencies": { "is-number": "^6.0.0" },




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: