DEV Community

Muhammad Harith Zainudin
Muhammad Harith Zainudin

Posted on

What is Lodash?

In the web, there are pretty much many libraries that can help us in software development/web development, we just need to find it. And in this series, we gonna hop in to learn about lodash. We will cover the famous and most used method.

Actually, I never knew about lodash until my colleague in my workplace introduce it to me, and I can proudly say that if you are using javascript, you must use lodash!

Lodash Logo

What is it?

Lodash is a modern JavaScript utility library with modularity, performance, and other features.
It will make your life easier to implement complex logic with only using the method in the library.

It simplifies JavaScript by removing the tedium of dealing with arrays, numbers, objects, texts, and other data types.
The modular methods of Lodash are ideal for:

  1. Arrays, objects, and strings when it is being iterated.
  2. Changing and testing values
  3. Putting together composite functions

How to include lodash in your web app/node js app?

In the browser, include the script below

<script src="lodash.js"></script>
Enter fullscreen mode Exit fullscreen mode

If you are using using npm, install it first by running script below

$ npm i -g npm
$ npm i --save lodash
Enter fullscreen mode Exit fullscreen mode

Then include it in you node js application

const _ = require('lodash');
Enter fullscreen mode Exit fullscreen mode

Usually, we will use underscore _ to use lodash.

Installing Lodash

And that's it! You're good to go!


Thank you for reading :D

Psstt pstt :p
Do consider to love this article ❀️ and follow me! Why not right? It's FREE~
I would really appreciate it πŸ‘¨πŸ»β€πŸ’»
Will be posting more on things related to AWS, Javascript, Python, Serverless and more!

Top comments (1)

Collapse
 
harithzainudin profile image
Muhammad Harith Zainudin

Indeed you're correct. Javascript is becoming much easier nowadays with the present method they have. We just need to have the correct method to use