Creates a function that invokes func with partials prepended to the arguments it receives. Like _.bind, but it does not alter the this binding. Part of Lodash 4.x Function (since 0.2.0).
Pass the required arguments shown below. Most helpers return a new function you call later.
Syntax
Call _.partial. Start with this line.
Lodash
_.partial(func, [partials])
Call
What it does
_.partial(func, [partials])
Primary signature.
_.partial(func)
Wrap or transform a function.
Prefer import partial from "lodash/partial" when you want a smaller bundle.
Library declarations
Lodash
_.partial(func, [partials])
Parameters
Parameter
Description
func
Required. Function to partially apply
partials
Optional. Leading values and/or placeholders
Return Value
Return Value
Description
*
New wrapper function
Lodash Examples
Example 1 — Official: Fix the Greeting
Lock the first argument; pass the name when calling.
Note. Unlike curry, you are not chaining — one wrapper, then call.
Compatibility
Browser & Runtime Support
_.partial is a Lodash 4.x Function helper (since 0.2.0). It runs anywhere Lodash runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash. Native Function.prototype.bind can also fix leading args but always binds this; Lodash partial leaves this alone and adds placeholders.
✓ Stable · Lodash 4.x
_.partial()
Available in [email protected] full builds and the lodash/partial 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
_.partialLodash 4.x+
Bottom line: Safe for production once Lodash is loaded. Prefer import partial from "lodash/partial" for smaller builds. Ideal for specialized helpers, config injection, and reusable call adapters.
Frequently Asked Questions
_.partial(func, ...partials) returns a function that invokes func with those partials prepended to later call arguments. It does not change this.
_.partial.placeholder (or _ in full builds) marks a slot to fill later. Later call arguments fill placeholders in order.
bind sets this (and can also fix args). partial only fixes arguments and leaves this alone.
partial fixes leading args. partialRight fixes trailing args.
partial fixes values once and returns a ready-to-call function. curry returns a chain of functions until arity is met.
Use import partial from "lodash/partial" or require("lodash/partial"). Placeholders: partial.placeholder.