Live data from Hacker News

Lists of JavaScript methods which you can use natively

github.com

1–10 of 162 posts

Re: Lists of JavaScript methods which you can use natively

#2
https://github.com/cht8687/You-Dont-Need-Lodash-Underscore#_... - the Array.prototype.find() method that's suggested has no support on Android's stock browser or Chrome for Android. That's a huge chunk of the browser market, but there's no mention of it on the list. In fact, there's no consideration for mobile at all on any of the suggestions.

If you're going to use any of the suggestions, check MDN or CanIUse first.

Re: Lists of JavaScript methods which you can use natively

#3
Instead of searching for the compatibility of each individual function I would much rather just use a custom build of Lodash with the collection of functions I need (which can even be handled by your build process now and some tree shaking). And I get a lot of utility functions with it too that I use a lot like Throttle and Debounce.

Re: Lists of JavaScript methods which you can use natively

#5

Instead of searching for the compatibility of each individual function I would much rather just use a custom build of Lodash with the collection of functions I need (which can even be handled by your build process now and some tree shaking). And I get a lot of utility functions with it too that I use a lot like Throttle and Debounce.

Throttle and debounce are top of my list as well

Re: Lists of JavaScript methods which you can use natively

#7
You'll be stuck with using a shim for old browsers for quite a while to come, especially when it comes to mobile.

The good thing is, at some point in the future you can just drop the shim and everything keeps working.

Lodash does has a lot of additional nice utility functions though.

Re: Lists of JavaScript methods which you can use natively

#9
I understand why, and once upon a time I was the guy who would commit code where I replaced jQuery and underscore (at the time) calls with native calls. It works, and is totally fine. But what was the point? Some kind of optimization? It was pretty pointless in hindsight and just made my coworkers trouble. Now all my JS code is Ramda/lodash all the way, and it's great (although I opt for Clojure/script when possible)
Post reply on HN