Creates a function that invokes func with an array of arguments much like Function#apply. Based on the spread operator. Part of Lodash 4.x Function (since 3.2.0).
Pass the required arguments shown below. Most helpers return a new function you call later.
Syntax
Call _.spread. Start with this line.
Lodash
_.spread(func, [start=0])
Call
What it does
_.spread(func, [start=0])
Primary signature.
_.spread(func)
Wrap or transform a function.
Prefer import spread from "lodash/spread" when you want a smaller bundle.
Library declarations
Lodash
_.spread(func, [start=0])
Parameters
Parameter
Description
func
Required. Function that takes separate parameters
start
Optional. Index of the array to expand; default 0
Return Value
Return Value
Description
*
New spread-style wrapper
Lodash Examples
Example 1 — Official: Expand a Pair
Pass one array; the wrapper fills two parameters.
Lodash
var say = _.spread(function(who, what) {
return who + " says " + what;
});
say(["fred", "hello"]);
// → "fred says hello"
Pick. Use spread for Promise/array pipelines; rest for variadic callers.
Compatibility
Browser & Runtime Support
_.spread is a Lodash 4.x Function helper (added in 3.2.0). It runs anywhere Lodash runs — modern browsers (via CDN or bundle) and Node.js / Bun / Deno with npm install lodash.
✓ Stable · Lodash 3.2.0+
_.spread()
Available in [email protected] full builds and the lodash/spread modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.
100%With Lodash 3.2.0+
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
_.spreadLodash 3.2.0+
Bottom line: Safe for production once Lodash 3.2.0+ is on the page or in your bundle. Prefer import spread from "lodash/spread" for smaller builds. For gathering args into an array, use _.rest.
Frequently Asked Questions
_.spread(func, [start=0]) returns a wrapper that invokes func by expanding the array (or array-like value) at the start index into individual arguments — much like Function#apply for that segment.
_.rest gathers many call-site arguments into one array. _.spread expands one array argument into many parameters. They are complementary transforms.
Similar idea for the spread segment. _.spread returns a reusable wrapper with an optional start offset and fits naturally with Promise.then.
Yes. Promise.all([...]).then(_.spread(fn)) is the official pattern when async work resolves to a tuple array.
It is the index of the array to expand. Default 0 means the first argument must be the array. A higher start keeps leading scalars and spreads the array at that position.
Use import spread from "lodash/spread" or require("lodash/spread") for tree-shaking friendly bundles. Full build: import _ from "lodash" then _.spread.