Lodash _.some() Method

Beginner
5 min read
Updated: Nov 2026
5 examples
Collection

Definition

Checks if a predicate returns truthy for any element of a collection. Iteration stops at the first match. Part of Lodash 4.x Collection (since 0.1.0).

Pass the required arguments shown below. Lodash Collection helpers usually return a new value — check whether the source is mutated.

Syntax

Call _.some on a collection. Start with this line.

Lodash
_.some(collection, [predicate=_.identity])
CallWhat it does
_.some(collection, [predicate=_.identity])Primary signature.
_.some(collection)Call with a collection argument.

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

Library declarations
Lodash
_.some(collection, [predicate=_.identity])

Parameters

ParameterDescription
collectionRequired. Array or object to scan
predicateOptional. (value, index|key, collection); default identity

Return Value

Return ValueDescription
*true if any element passes, else false

Lodash Examples

Example 1 — Official: Any Truthy Value

Use Boolean as the predicate to detect any truthy element.

Lodash
_.some([null, 0, "yes", false], Boolean);
// → true
Try It Yourself

How It Works

  1. Scan. Start at null and 0 — both falsy.
  2. Hit. "yes" is truthy → predicate succeeds.
  3. Stop. Lodash returns true without checking false.
  4. Identity tip. Omitting the predicate uses identity — same idea for mixed lists.

Example 2 — Official: Property Shorthand

A string iteratee asks whether any object has a truthy property.

Lodash
var users = [
  { user: "barney", active: true },
  { user: "fred",   active: false }
];

_.some(users, "active");
// → true
Try It Yourself

How It Works

  1. Shorthand. "active" means read each object’s .active.
  2. barney. true → match found.
  3. Stop. Returns true before needing fred.
  4. Same as. function (o) { return o.active; }.

Example 3 — Official: matchesProperty Pair

Test whether any row has a property equal to a value.

Lodash
var users = [
  { user: "barney", active: true },
  { user: "fred",   active: false }
];

_.some(users, ["active", false]);
// → true
Try It Yourself

How It Works

  1. Pair. ["active", false] means “is active equal to false?”.
  2. barney. active: true → no match.
  3. fred. Matches → return true.
  4. Use. Great for “is anyone inactive?” checks.

Example 4 — Official: Matcher Object (No Match)

Partial object match — returns false when nothing fits.

Lodash
var users = [
  { user: "barney", active: true },
  { user: "fred",   active: false }
];

_.some(users, { user: "barney", active: false });
// → false
Try It Yourself

How It Works

  1. Matcher. Both user and active must match.
  2. barney. Right user, wrong active.
  3. fred. Wrong user.
  4. Result. No element matched → false.

Example 5 — Empty Collection

Nothing to test → false (same idea as native Array.some).

Lodash
_.some([], Boolean);
// → false

_.some({}, "active");
// → false
Try It Yourself

How It Works

  1. No visits. The loop body never runs.
  2. Default. Lodash returns false.
  3. Contrast. _.every([], pred) returns true (vacuous truth).
  4. Guard. Empty lists mean “no one matched,” not an error.

Browser & Runtime Support

_.some is a Lodash 4.x Collection helper (since 0.1.0). It runs anywhere Lodash runs — modern browsers (via CDN or bundle) and Node.js / Bun / Deno with npm install lodash.

✓ Stable · Lodash 0.1.0+

_.some()

Available in [email protected] full builds and the lodash/some 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
_.some Lodash 4.x+

Bottom line: Safe for production once Lodash is on the page or in your bundle. Prefer import some from "lodash/some" for smaller builds. Not a native browser API — load Lodash first. For arrays-only, Array.prototype.some is also fine.

Frequently Asked Questions

_.some(collection, predicate) returns true if the predicate is truthy for any element. Iteration stops at the first match (short-circuit).
_.some([]) and _.some({}) return false — nothing was visited, so nothing passed.
some asks “does at least one pass?” every asks “do all pass?” Empty every is true; empty some is false.
Yes. Property names, matchers, and matchesProperty pairs work like other Lodash collection helpers.
No. It only reads elements and returns a boolean.
Use import some from "lodash/some" or require("lodash/some") for tree-shaking. Full build: import _ from "lodash" then _.some.

Next: _.sortBy()

Sort a collection by one or more iteratees.

_.sortBy() 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