Member-only story
Taking Lodash off the Down Low for New Devs
Another Tool for Your Javascript Belt
What is Lodash?
Let’s talk about one of the most popular and heavily downloaded npm packages. Lodash is a JavaScript library that provides built in functions for common programming tasks by using a functional programming paradigm; it builds upon the older underscore.js library. The Lodash built-in utility functions make coding in JavaScript easier and cleaner. Instead of writing common repetitive functions, the task can be accomplished with a single line of code after importing the package.
Installation is Easy
Lodash can be installed via NPM or Yarn:
npm install --save lodash
After installation is complete, Lodash can be imported into a JavaScript file as:
import _ from "lodash"
Now, all of Lodash’s functions can be accessed by the underscore operator.
Here’s an example using the _.concat() function, more about that shorty
let arr = ['dog', 'cat', 'bird', 'hamster']