Creates a function that invokes func with its arguments transformed by matching transform functions — one adapter per parameter slot. Part of Lodash 4.x Function (since 4.0.0).
Pass the required arguments shown below. Most helpers return a new function you call later.
Syntax
Call _.overArgs. Start with this line.
Lodash
_.overArgs(func, [transforms=[_.identity]])
Call
What it does
_.overArgs(func, [transforms=[_.identity]])
Primary signature.
_.overArgs(func)
Wrap or transform a function.
Prefer import overArgs from "lodash/overArgs" when you want a smaller bundle.
Library declarations
Lodash
_.overArgs(func, [transforms=[_.identity]])
Parameters
Parameter
Description
func
Required. Function invoked with transformed args
transforms
Optional. Array of unary adapters; default identity
Return Value
Return Value
Description
*
New wrapper function
Lodash Examples
Example 1 — Official: Square + Double
Transform each argument before packing them into an array.
Lodash
function doubled(n) {
return n * 2;
}
function square(n) {
return n * n;
}
var func = _.overArgs(function (x, y) {
return [x, y];
}, [square, doubled]);
func(9, 3);
// → [81, 6]
Tip. Use _.identity explicitly for slots you want to document as unchanged.
Compatibility
Browser & Runtime Support
_.overArgs is a Lodash 4.x Function helper (since 4.0.0; formerly _.modArgs). It runs anywhere Lodash runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash. There is no single native Function.overArgs.
✓ Stable · Lodash 4.x
_.overArgs()
Available in [email protected] full builds and the lodash/overArgs modular import. 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
_.overArgsLodash 4.x+
Bottom line: Safe for production once Lodash is loaded. Prefer import overArgs from "lodash/overArgs" for smaller builds. Ideal for coercing, cleaning, or normalizing arguments before a core function runs.
Frequently Asked Questions
_.overArgs(func, transforms) returns a wrapper that maps each argument through the transform at the same index, then calls func with those mapped values.
Yes. Lodash treats each transform as unary — it receives only the matching argument value.
Extra arguments past the transforms list are still passed through to func unchanged.
rearg reorders arguments. overArgs transforms values in place by position — it does not swap slots.
ary/unary cap how many arguments reach func. overArgs keeps arity but adapts each slot’s value first.
Use import overArgs from "lodash/overArgs" or require("lodash/overArgs") for tree-shaking. Full build: import _ from "lodash" then _.overArgs.