News for hackers. Stuff that matters.
Re:A web of trust for NPM by krapp on Saturday October 03, 2020 @06:03PM (#24675024)
>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.

[dead]
Re:A web of trust for NPM by cortesoft on Saturday October 03, 2020 @06:34PM (#24675178)
The 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
Re:A web of trust for NPM by trollied on Saturday October 03, 2020 @06:44PM (#24675227)
Yeah, 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.