1. 6
  1.  

  2. 3

    I’ll bite: this was a ridiculous situation before left-bad broke the world and it’s only more ridiculous since then. That checking for numeric properties is expedited instead of hindered by pulling in multiple dependencies over multiple HTTP requests each is kind of an indictment of JavaScript and its curation over the last thirty years.

    1. 2

      This article made mention of an NPM package that gets 180k downloads each week. I thought, that seems like a lot, this is probably a pretty useful package. IT IS NOT. Well, I guess it is, but it is silliness to the max. It is basically a type-safe (well, as type safe as JS gets) method for checking if a number is even.

      Keep in mind that most of those “weekly downloads” are automated build systems and not users downloading it manually. Also, most of the transitive dependencies that are downloaded are larger “standard library” packages. We’d need to do more research to figure out if people actually use isOdd.

      1. 1

        here’s another article with some more fun examples (as well as talking a little about left-pad): https://www.davidhaney.io/npm-left-pad-have-we-forgotten-how-to-program

        1. 1

          Left-pad? That ain’t nothin! Hold my beer and watch this!