lodash
A modern utility library delivering modularity, performance, and extras for working with arrays, objects, and functions.
lodash
General JSA modern utility library delivering modularity, performance, and extras for working with arrays, objects, and functions.
Fit
Bundle (gzip)
25.3 kB
70.2 kB raw
Install size includes transitive dependencies. Bundle size is gzipped browser payload.
Freshness
The Problem
Everyday data wrangling — deep cloning, grouping, debouncing, deep property access, and set operations — is verbose and error-prone with plain JavaScript, and hand-rolled helpers tend to drift and break on edge cases like null or nested values.
What It Does
lodash provides hundreds of battle-tested, consistent utilities for collections, objects, strings, and functions. It handles edge cases predictably, supports per-method imports to keep bundles small, and is one of the most depended-upon packages in the npm ecosystem.
Installation
npm install lodashUsage Example
import { groupBy, debounce, get } from "lodash";
const users = [
{ name: "Ada", team: "core" },
{ name: "Lin", team: "core" },
{ name: "Max", team: "ops" },
];
console.log(groupBy(users, "team"));
// { core: [...], ops: [...] }
console.log(get(users, "[0].name")); // "Ada"
const onSearch = debounce((q) => console.log("search:", q), 200);
onSearch("lo");Related packages
Unified TypeScript SDK for building AI-powered apps — switch between 20+ LLM providers without rewriting code.
animejsGeneral JSLightweight JavaScript animation library with a tiny footprint and a powerful, expressive API.
AOSGeneral JSAn easy-to-use library that makes elements fade, slide, or zoom into view as the user scrolls down your page.
archiverGeneral JSStreaming interface for generating ZIP and TAR archives in Node.js — create compressed archives programmatically from files, directories, and buffers.
@formkit/auto-animateGeneral JS> Add smooth transitions to any element with a single line — zero-config animations for adds, removes, and moves.