But that's not your priority when building website, it doesn't matter if your JS is 60Kb or 20. No one cares how much dependencies you build system pulls. You need tested, reliable and working libs to do their job, and not write your own routines for 3 months.
Lists of JavaScript methods which you can use natively
21–30 of 162 posts
Re: Lists of JavaScript methods which you can use natively
#22"However, when you are targeting modern browsers" - possibly one of the worst mistakes companies do. Then they decide to support older browsers after customers complaints. Then shit goes down!
Re: Lists of JavaScript methods which you can use natively
#23There's a huge gotcha: _.map, _.forech, ... can iterate over objects (often used as associative arrays) - Native map can't. At some point you'll need lodash and co again - at least for convinience.
Object.keys() is rather well supported these days though.
Re: Lists of JavaScript methods which you can use natively
#24Re: Lists of JavaScript methods which you can use natively
#25Instead 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.
If you just use lodash from a CDN, many, many users will already have it. If you make a custom build, then everyone has to download.
You might be better off bundling lodash and tree shaking everything you don't actually use away.
Re: Lists of JavaScript methods which you can use natively
#26Instead 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.
If you just use lodash from a CDN, many, many users will already have it. If you make a custom build, then everyone has to download.
Re: Lists of JavaScript methods which you can use natively
#27Instead 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.
If you just use lodash from a CDN, many, many users will already have it. If you make a custom build, then everyone has to download.
Especially for those with empty cache (need to make 1 extra DNS request, download 1 extra file, which is mostly unneeded, etc).
Re: Lists of JavaScript methods which you can use natively
#28Earlier quoted context omitted.
If you just use lodash from a CDN, many, many users will already have it. If you make a custom build, then everyone has to download.
If he is building his code then he is probably bundling and minifying his entire client source together and being selective just keeps the build code smaller. Having one request for all of the client is more preferable to some. Anyways, I'm just saying I don't think he is just building a minified fork of lodash.