DEV Community

biplavmz
biplavmz

Posted on

Lodash

What is Lodash and why to use?

  1. Lodash is a JavaScript library.
  2. It helps in working with arrays,strings,objects,numbers,etc.
  3. It provides us with various inbuilt functions.
  4. It uses a functional programming approach which that coding in JavaScript easier to understand because instead of writing repetitive functions, tasks can be accomplished with a single line of code.
  5. It also makes it easier to work with objects in JavaScript if they require a lot of manipulation to be done upon them.

Why Lodash?

It provides various inbuilt functions for collections, arrays, to manipulate objects, and other utility methods that we can use directly instead of writing them from scratch.

It makes it easier to iterate over the arrays, strings as well as objects. Its modular methods enable the creation of composite functions easier.

Top comments (2)

Collapse
 
lexlohr profile image
Alex Lohr

Why shouldn't you use lodash?

  • not tree-shakable
  • full of functions that are now supported in plain JS
  • other functions mainly help to outsource complexity instead of reducing it
  • history of security issues: cvedetails.com/vulnerability-list/... โ€“ being globally used makes it a known target

Alternative solutions: github.com/you-dont-need/You-Dont-...

Collapse
 
biplavmz profile image
biplavmz

Thanks buddy for this important information