Skip to content
Search

Lodash

lastmod 2025-07-30created 2021-08-115 edits

A modern JavaScript utility library delivering modularity, performance & extras.

A utility library that makes it easy to work with essential data structures such as Array, Collection, and Object.

TypeScript support

Just install @types/lodash as well.

npm install --save @types/lodash

Consuming

You can use lodash in TypeScript code without much difficulty. This applies to both module and global code. For example, once you run npm install for the type declarations, you can import and use it

import * as _ from "lodash";
_.padStart("Hello TypeScript!", 20, " ");

Or, if you are not using modules, you can use the global variable _.

_.padStart("Hello TypeScript!", 20, " ");

Methods

cloneDeep

Performs a Deep Copy.

chunk

Splits into chunks of the desired size.

min, minBy

Gets the minimum value.

max, maxBy

Gets the maximum value.

See also

  • node
  • javascript
  • rambda - A lodash-like utility library that pre-implements functions commonly used in functional programming.
  • es-toolkit - Achieved 100% compatibility with Lodash (v1.39.3+)

Favorite site

author Zer0 sitemap