How to install Lodash

Created

Lodash is a JavaScript library that helps programmers write more concise and maintainable JavaScript.

Installation

You can download the latest version of Lodash from the GitHub releases or use a Lodash CDN.

Cloning a repository

You can clone a repository from GitHub.com to your local computer.
Cloning with HTTPS URLs
git clone https://github.com/lodash/lodash.git
Cloning with SSH URLs
git clone [email protected]:lodash/lodash.git
Cloning with GitHub CLI
gh repo clone lodash/lodash

Install via NPM package

Run the following command to locally install the package and its dependencies with NPM.
Downloading and installing packages locally
npm i lodash
npm install lodash
yarn add lodash
Downloading and installing packages globally
npm i -g lodash
yarn global add lodash
Install Specific Version of a Package
npm install [email protected]
Bower
bower install lodash

Why Lodash?

Lodash makes JavaScript easier by taking the hassle out of working with arrays, numbers, objects, strings, etc.

It can be broken down into several main areas:

  • checkUtilities - for simplifying common programming tasks such as determining type as well as simplifying math operations.
  • checkFunction - simplifying binding, decorating, constraining, throttling, debouncing, currying, and changing the pointer.
  • checkString - conversion functions for performing basic string operations, such as trimming, converting to uppercase, camel case, etc.
  • checkArray - creating, splitting, combining, modifying, and compressing.
  • checkCollection - iterating, sorting, filtering, splitting, and building.
  • checkObject - accessing, extending, merging, defaults, and transforming.
  • checkSeq - chaining, wrapping, filtering, and testing.