4 ms·
>Does that package exist because JavaScript lacks a modulus operator (I feel like I remember it having one), or because the operator does/doesn’t coerce things
by krapp 6y ago
>Does that package exist because JavaScript lacks a modulus operator (I feel like I remember it having one), or because the operator does/doesn’t coerce things into numbers the way you’d expect?
The package is written in javascript and uses the modulus operator.
It's just laziness and a cargo-cult mentality around package granularity that's gotten way out of hand. There's no rational basis for it.
- trollied 6y agoYet I get downvoted for calling it out. Go figure!
- cortesoft 6y agoThe point is that you don’t need “is_odd” in the standard library, you have modulus. You were arguing that JavaScript needs a better standard library to keep people from importing is_odd
- trollied 6y agoYeah, I tried to make an invalid point. My bad. The main point still stands though, I'm sure there's hundreds of other examples of pointless libraries that are easily covered by something that is trivial.