Creates a function that invokes the predicate properties of source with the corresponding property values of a given object, returning true if all predicates return truthy, else false. Part of Lodash Util since 4.0.0 (stable — not deprecated).
Note: Equivalent to _.conformsTo with source partially applied.
Syntax
Call _.conforms. Start with this line.
Lodash
_.conforms(source)
Call
What it does
_.conforms(source)
Primary signature.
_.conforms(...)
Call the util helper.
Prefer import conforms from "lodash/conforms" when you want a smaller bundle.
conforms. Runs a function on b → range/type checks.
matches. Checks whether values equal the pattern.
Same hit.b: 2 matches both styles here.
Choose. Logic per field → conforms; fixed shape → matches.
Compatibility
Browser & Runtime Support
_.conforms is a Lodash Util helper since 4.0.0. It runs anywhere Lodash runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash.
✓ Stable · Lodash 4.0.0+
_.conforms()
Available in [email protected] full builds and the lodash/conforms modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.
100%With Lodash 4.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
_.conformsLodash 4.0.0+
Bottom line: Safe for production once Lodash is loaded. Prefer import conforms from "lodash/conforms" for smaller bundles. Use it to build reusable property-predicate checkers for filter and cond.
Frequently Asked Questions
_.conforms(source) returns a function that checks an object: for each key in source, it runs the predicate on object[key]. All predicates must return truthy. Official use: _.filter(objects, _.conforms({ b: n => n > 1 })).
The created function is equivalent to _.conformsTo with source partially applied. Use conforms for a reusable predicate; conformsTo for a one-shot boolean check.
Only the property value (object[key]), not the whole object. Cross-field rules need a custom wrapper.
No. Only keys listed in source are tested. Extra keys on the target object are ignored.
_.matches compares values with partial deep equality. _.conforms runs custom predicate functions per key (ranges, types, regexes).
Use import conforms from "lodash/conforms" or require("lodash/conforms"). Full build: import _ from "lodash" then _.conforms.