Lodash _.min() Method

Beginner
5 min read
Updated: Nov 2026
5 examples
Math

Definition

Computes the minimum value of array. If array is empty or falsey, undefined is returned. Part of Lodash 4.x Math (since 0.1.0).

Pass the numbers or collection shown below. Check the return value before you chain another math helper.

Syntax

Call _.min. Start with this line.

Lodash
_.min(array)
CallWhat it does
_.min(array)Primary signature.

Prefer import min from "lodash/min" when you want a smaller bundle.

Library declarations
Lodash
_.min(array)

Parameters

ParameterDescription
arrayRequired. Collection to scan

Return Value

Return ValueDescription
*Minimum value, or undefined if empty/falsey

Lodash Examples

Example 1 — Official Minimum

Find the smallest number in a list.

Lodash
_.min([4, 2, 8, 6]);
// → 2
Try It Yourself

How It Works

  1. Scan. Lodash walks the array once.
  2. Compare. Keeps the smaller value at each step.
  3. Result. 2 wins — same as the official docs.
  4. Return. The element itself (not an index).

Example 2 — Empty / Falsey → undefined

No values means no minimum.

Lodash
[
  _.min([]),
  _.min(null),
  _.min(undefined)
];
// → [undefined, undefined, undefined]
Try It Yourself

How It Works

  1. Guard. Lodash checks array && array.length.
  2. Fail. Empty or falsey input short-circuits.
  3. Result. undefined — not Infinity.
  4. App tip. Default with _.min(arr) ?? 0 (not ||).

Example 3 — Negative Numbers

Works the same for negatives — smaller means more negative.

Lodash
_.min([-10, -3, -7]);
// → -10
Try It Yourself

How It Works

  1. Compare. -10 < -7 and -10 < -3.
  2. Winner. -10 is the minimum.
  3. Max twin. _.max([-10, -3, -7]) → -3.
  4. Use. Same API for positive or negative lists.

Example 4 — Skips NaN

Invalid numeric candidates are ignored while scanning.

Lodash
[
  _.min([4, NaN, 2]),
  _.min([NaN, NaN])
];
// → [2, undefined]
Try It Yourself

How It Works

  1. Skip. NaN (and typically null / undefined) is not kept as a candidate.
  2. Keep. Valid numbers still compete → 2.
  3. All bad. Only NaN values → undefined.
  4. vs Math.min. Math.min(4, NaN, 2) becomes NaN.

Example 5 — min vs minBy

Objects need an iteratee — that is minBy, not min.

Lodash
var users = [
  { name: "a", age: 20 },
  { name: "b", age: 40 },
  { name: "c", age: 30 }
];

_.minBy(users, "age");
// → { name: "a", age: 20 }

// _.min(users) is not useful for object scores
Try It Yourself

How It Works

  1. min. Compares elements as-is — for plain numbers.
  2. minBy. Compares by "age" (or a function).
  3. Footgun. A second arg to _.min is ignored in Lodash 4.x.
  4. Pick. Numbers → min. Objects → minBy.

Browser & Runtime Support

_.min is a Lodash Math helper (since 0.1.0, current docs cover 4.x). It runs anywhere Lodash runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash. Closest native cousin is Math.min(...array), but Lodash takes an array, returns undefined for empty input, and skips NaN candidates.

✓ Stable · Lodash 4.x

_.min()

Available in [email protected] full builds and the lodash/min modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.

100% With Lodash 4.x
Google Chrome Supported · Desktop & Mobile
Full support
Mozilla Firefox Supported · Desktop & Mobile
Full support
Apple Safari Supported · macOS & iOS
Full support
Microsoft Edge Supported · Chromium
Full support
Internet Explorer No native support · Use a polyfill
Polyfill
Opera Supported · Modern versions
Full support
Samsung Internet Supported · Android
Full support
Bun Supported · JavaScript runtime
Supported
Deno Supported · JavaScript runtime
Supported
Node.js Supported · Server runtime
Supported
Android WebView Supported · Modern WebView
Full support
_.min Lodash 4.x+

Bottom line: Safe for production once Lodash is loaded. Prefer import min from "lodash/min" for smaller builds. Ideal for finding the lowest score, price, or timestamp in a list.

Frequently Asked Questions

_.min(array) returns the smallest value in the array. Empty or falsey input returns undefined.
Math.min(...arr) needs spread and returns Infinity for no args. _.min takes an array and returns undefined when empty.
No. A second argument is ignored. For objects use _.minBy(array, iteratee).
They are skipped while scanning. If every value is skipped, the result is undefined.
_.min([3, 0, 5]) || -1 becomes -1 because 0 is falsy. Use ?? so only undefined triggers the default.
Use import min from "lodash/min" or require("lodash/min") for tree-shaking. Full build: import _ from "lodash" then _.min.

Next: _.minBy()

Find the minimum item by a property path or iteratee function.

_.minBy() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful