top | item 17302799

(no title)

heckanoobs | 7 years ago

Hacker News should have stronger antibodies to content marketing.

This one is even easier to spot because it recommends lodash in 2018

discuss

order

megaman22|7 years ago

The only issue I have with lodash is that a typical npm install for any significant project that I've worked on will pull in approximately 87 different copies of it, up and down the dependency tree, of nearly every release that is still accessible.

A standard library that wasn't so anemic would be a grand thing.

steve_adams_86|7 years ago

Do you think there's a better alternative or are you addressing that lodash is pretty old now?

heckanoobs|7 years ago

Lodash has two values, a bunch of utility functions and it works cross browser. The most common utility functions are now standard issue in es6+. And a transpilation build process is a superior way of dealing with cross browser incompatibilities. Babel + browserlist + caniuse all work seamlessly to ensure you only have the polyfills and browser support you need, vs the one-size-fits-all approach of lodash.

There's probably a handful of functions in lodash that are still useful but why take on the security risk and maintenance of another package dependency if you can just copy a couple ten-liners into your own utils folder? It's not like the world is going to come up with a more performant debounce anytime soon.

I guess lodash also relies on jquery which is in the same boat. es6+ has stolen a lot of its thunder and target-aware transpilation is a better approach to cross browser support

nailer|7 years ago

The standard library. There's a few things missing in ES8, but not a huge amount.

Also sugar.js is dead. I maintain http://agavejs.org, an ES8 based replacement, which is stil going.