4 ms·
Nearly everyone has had it drilled into them the "Don't reinvent the wheel." nonsense for better or worse. I use lodash in almost every javascript project I st
by buckbova 11y ago
Nearly everyone has had it drilled into them the "Don't reinvent the wheel." nonsense for better or worse.
I use lodash in almost every javascript project I start, big or small because it makes my life easier.
I'd rather use the lodash isArray than roll my own.
https://lodash.com/docs#isArray https://lodash.com/docs#isArray
- n4sa 11y agoYeah but you're loading an entire library to use one function?
- xentronium 11y agoTree shaking.
- jessaustin 11y agoDo you support IE 8? If not, why not use the one provided by the language, Array.isArray()?
- cpeterso 11y agoThe latest version of lodash (4.0.0) doesn't support IE 8, so you would need to polyfill isArray() yourself or use a pre-modern lodash version.
- jessaustin 11y agoYeah I agree that polyfilling makes more sense than depending on lodash just to get isArray(). I wonder if we'll start seeing the sorts of "you don't need..." rants about lodash that we've seen about jquery for some time now?