🛠️
Utility50M+/wkMIT

lodash

Lodash is the most popular JavaScript utility library, providing a comprehensive collection of functions for manipulating arrays, objects, strings, numbers, and

Installation

npm
npm install lodash
yarn
yarn add lodash
pnpm
pnpm add lodash

Import

ESM
import _ from 'lodash';

Quick Example

usage
import { debounce, groupBy, get } from 'lodash';

const debouncedSearch = debounce(search, 300);

const grouped = groupBy(users, 'role');

const name = get(user, 'profile.name', 'Unknown');

About lodash

Lodash is the most popular JavaScript utility library, providing a comprehensive collection of functions for manipulating arrays, objects, strings, numbers, and functions. Created as a fork of Underscore.js with better performance and consistency, Lodash has become the de facto standard for utility functions in JavaScript projects. The library provides deep cloning (cloneDeep), deep merging, object path access (get/set), collection operations (groupBy, keyBy, sortBy, uniq), function utilities (debounce, throttle, memoize, once, curry), string manipulation (camelCase, kebabCase, capitalize, truncate), and type checking functions. Lodash is highly modular — you can import individual functions (lodash/debounce) or use lodash-es for tree-shakeable ES module imports. The library handles edge cases and cross-browser inconsistencies that native JavaScript methods may not, providing reliable behavior across environments. While modern JavaScript has adopted many utility functions natively (Array.flat, Object.entries, Array.find), Lodash's deep operations, functional programming utilities, and collection processing functions remain valuable for complex data transformation tasks in production applications.

Quick Facts

Packagelodash
CategoryUtility
Weekly Downloads50M+
LicenseMIT
Installnpm install lodash

Related Packages

Browse npm Packages by Category

Explore our reference of 200 popular npm packages with install commands, examples, and quick-start guides.