Enables explicit method chaining on an existing Lodash wrapper (from _(value)). Methods that would auto-unwrap in hybrid mode (like head) stay wrapped until .value(). Part of Lodash 4.x Seq / wrapper prototype.
Call it on a Lodash wrapper. Finish with .value() when you need a plain result.
Syntax
Call .chain(). Start with this line.
Lodash
_(value).chain()…value()
Call
What it does
_(value).chain()…value()
Primary signature.
Prefer import _ from "lodash" (full build) when you need wrapper prototype helpers.
Library declarations
Lodash
_(value).chain()…value()
Parameters
Parameter
Description
Wrapper
Required. From _(value)
.value()
Required. Plain JavaScript result
Return Value
Return Value
Description
*
The value returned by .chain().
Lodash Examples
Example 1 — Official: head then pick
Explicit mode lets head stay wrapped so pick works.
Wrapper .chain() ships with Lodash 4.x Seq. It runs anywhere full Lodash runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash. Modular lodash/* imports typically omit wrapper chaining.
✓ Stable · Lodash 4.x
Wrapper .chain()
Available on wrappers from _(value) in [email protected] full builds. Works in evergreen browsers and current Node LTS when Lodash is installed.
100%With Lodash 4.x
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
wrapper.chainLodash 4.x full
Bottom line: Safe for production with full Lodash. Use when hybrid auto-unwrap would break the next step; otherwise prefer _(v) or _.chain(v).
Frequently Asked Questions
It enables explicit chaining on an existing Lodash wrapper. Later methods stay wrapped until .value(), even methods like head() that auto-unwrap in hybrid mode.
No. _.chain(value) starts a pipeline already in explicit mode. Wrapper .chain() switches an existing _(value) wrapper from hybrid to explicit mid-pipeline.
When you want to call a single-value method (head, first, last, …) and then keep chaining (e.g. .pick()).
_(users).head() returns a plain object — you cannot call .pick() on it.
No. Call _(value).chain() with no arguments.
Yes. Explicit chains stay wrapped until .value() or .valueOf().