3 ms·
I wonder why they don't replace these simple packages like `is-string` with Lodash, which has all these functions and more. Bundle size isn't a problem: they'r
by sergiomattei 5y ago
I wonder why they don't replace these simple packages like `is-string` with Lodash, which has all these functions and more.
Bundle size isn't a problem: they're ES modules, so you can do something like `lodash/isString` and import only what you need.
Seems like that would cut down on a lot of dependencies. I'm curious why the ecosystem hasn't adopted this or a similar approach.
- Waterluvian 5y agoAlso tree shaking out the stuff you don’t need has never worked better. It’s pretty trivial with lodash.
- alexfrydl 5y agoThey're probably dependencies of dependencies. You depend on some very useful package and somewhere down the line it depends on something written to be platform agnostic in 2012 when lodash wasn't modular and JavaScript wasn't as mature. The ecoystem hasn't adopted a better approach because it would require every individual package developer to understand the problem, get on board, then update and test everything they've written.
- jeswin 5y ago> I wonder why they don't replace these simple packages like `is-string` with Lodash... As someone who maintains a few dozen packages (public and otherwise), lodash has wasted more of my time than any other - due to its frequent security issues. It was almost always lodash, and I would have to update a dozen packages everytime. Things may have improved; I no longer use lodash anywhere.