Another one-liner package broke the JS ecosystem

Leonidas Boutsikaris
ITNEXT
Published in
2 min readApr 26, 2020

--

Photograph by Maël Ball

People just hate javascript to fit in, to look cool or to sound like they know what they’re talking about. This issue is one amongst many arguments that make the “JS bad”.

Javascript depends on npm packages. As we can see in this issue this utility function, whose sole purpose is to return a boolean value, according to naming conventions, does not always return a boolean value.

We can see at the dependency graph that nearly 3.4 million repositories were affected. This is the one-liner that did the job.

Pretty unreadable, amirite? If you write it out in long form it’s more like 3 if statements and two returns and a bunch of edge cases. In javascript this is a reason for creating an entire package.

The main argument against it is that all the environments need to support it. In addition a lot of these one liners address deficiencies of the weak and dynamic type system. So the package manager(NPM) can be seen sort of as a bug patcher.

Why they don’t create a standard library? things would be faster in the browser and more reliable. As i said before environment support but also this:

xkcd standards

Another problem is that this one-liners are used to get big stats in the NPM’s user rankings by posting a lot of them. Lots of people tend to brag about how their 1-line package was downloaded thousands or millions of times on their resume. Things like this make me consider leaving software engineering and instead find purpose in life with an indoor small dog hotel for corgis.

Different people want to build different things, they may not like JS as it is. Thats why they built an ecosystem of one-liners that everyone can create on top of it the “standard” that they have in mind.

Summing it up we have a “3.6 Roentgen not great not terrible” kind of language. Let’s hope it doesn’t blow up.

--

--

Software Engineer, writing code and blogging about it. Found something interesting? Buy me a coffee! https://ko-fi.com/leobouts