lodash is a popular JavaScript utility library that provides a wide range of functions for manipulating and working with arrays, objects, strings, and more. It is known for its consistency, performance, and extensive feature set, making it a go-to choice for many developers when it comes to handling data manipulation tasks in JavaScript projects.
While lodash is widely used and highly regarded, there are other utility libraries in the JavaScript ecosystem that offer similar functionalities. Here are a few alternatives:
Check out this comparison: Comparing immutable vs lodash vs ramda vs underscore.
The Lodash library exported as Node.js modules.
Using npm:
$ npm i -g npm
$ npm i --save lodash
In Node.js:
// Load the full build.
var _ = require('lodash');
// Load the core build.
var _ = require('lodash/core');
// Load the FP build for immutable auto-curried iteratee-first data-last methods.
var fp = require('lodash/fp');
// Load method categories.
var array = require('lodash/array');
var object = require('lodash/fp/object');
// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
var at = require('lodash/at');
var curryN = require('lodash/fp/curryN');
See the package source for more details.
Note:
Install n_ for Lodash use in the Node.js < 6 REPL.
Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.
Automated browser & CI test runs are available.