This one is even easier to spot because it recommends lodash in 2018
This one is even easier to spot because it recommends lodash in 2018
A standard library that wasn't so anemic would be a grand thing.
Also sugar.js is dead. I maintain http://agavejs.org, an ES8 based replacement, which is stil going.
Ramada.js is geared around making partial function application easy to do. In general, the utitility functions accept any helper callbacks first, and input data last, and automatically generate a partially applied function if you skip any trailing arguments.
For those of you coming from the Java / C++ / Simula 67 culture, this level of brevity may take some getting used to :-)
Ramda does a really good job of helping you “Stop Writing Classes”, composing functions instead.
(Ramada)
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
Lodash also differs from the standard lib's implementation, notably it's too permissive. Take this example:
const uhoh = null
_.forEach(uhoh, () => {})
uhoh.forEach(() => {})
lodash's forEach has no problem running on a falsey value (it gives you back the value) whereas standard lib leads you to a TypeError.
Two thoughts here. The standard lib forces the programmer to think more about types, which is a good thing. Second is that lodash's more loosey goosey approach acts as vendor lock-in. In two years, when there's 60 lines and 3 files of separation btwn uhoh's assignment and the _.forEach invocation, you won't know whether it's expected to be null or not. So you won't know if you should replace the code with
uhoh.forEach(...)
or
(uhoh || []).forEach(...)