A helper that presets some named fields of a function’s single object argument. Later, you pass the remaining fields; Ramda deep-merges both objects and calls your function once.
Status: added in Ramda v0.28.0 — stable, not deprecated, experimental, or non-standard. Older Ramda versions don’t have it.
Syntax
Call R.partialObject. Start with this line.
Ramda
R.partialObject(f, preset)
Call
What it does
R.partialObject(f, preset)
Primary signature.
R.partialObject(...)
Call the function helper.
Prefer import { partialObject } from "ramda" when you want a named import.
Merge per item. Each call builds { salutation, firstName } and runs greet.
Safe reuse. The merge creates a new object every time; neither the preset nor people changes.
Compatibility
Browser & Runtime Support
R.partialObject was added in Ramda v0.28.0. Ramda’s browser build is plain ES5, so it runs in any modern browser and in Node.js / Bun / Deno with npm install ramda.
✓ Stable · Ramda 0.28.0+
R.partialObject()
Check your Ramda version first — this helper is missing before 0.28.0. The examples use ES2015 destructuring and arrow functions, supported by every evergreen browser.
100%With Ramda 0.28.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
R.partialObjectRamda 0.28.0+
Bottom line: Safe for production with Ramda 0.28.0 or newer. On an older pinned version, upgrade Ramda or wrap the function yourself with R.mergeDeepRight. The labs on this page use [email protected].
Frequently Asked Questions
R.partialObject(f, preset) returns a new function g. When you call g(props), Ramda deep-merges preset with props (props wins on conflicts) and calls f with that one merged object. The docs sample: R.partialObject(multiply2, { a: 2 })({ b: 2 }) //=> 4.
R.partial presets leftmost positional arguments from an array: partial(f, [a]). R.partialObject presets named keys of a single object argument: partialObject(f, { a }). Use partialObject when your function takes one options object.
Yes. The merge is mergeDeepRight, so the call's object wins. R.partialObject(multiply2, { a: 2 })({ a: 10, b: 2 }) is 20, not 4. That makes presets behave like overridable defaults.
Plain nested objects merge key by key, so preset.db.host survives when you only pass db.port. Arrays and other values are not merged — the call's value replaces the preset's.
R.partialObject was added in Ramda v0.28.0. In older versions it is undefined, so calling it throws TypeError: R.partialObject is not a function.
No. R.partialObject is a stable Ramda function helper since v0.28.0 — not deprecated, experimental, or non-standard.