Return a copy of the object, filtered to omit the blacklisted keys (or an array of keys). Alternatively accepts a predicate indicating which keys to omit (official Underscore docs). Stable helper — not deprecated. Does not mutate the source.
Pass the required arguments shown below. Underscore object helpers usually return a new value — check whether the source object is mutated.
Syntax
Call _.omit. Start with this line.
Underscore
_.omit(object, *keys) or predicate Returns New object without blacklisted keys Official example _.omit({name, age, userid}, "userid")
Call
What it does
_.omit(object, *keys) or predicate Returns New object without blacklisted keys Official example _.omit({name, age, userid}, "userid")
Primary signature.
_.omit(...)
Call with the arguments your case needs.
Load Underscore with import _ from "underscore" (or the UMD CDN build) so these helpers are available as _.
Library declarations
Underscore
_.omit(object, *keys) or predicate Returns New object without blacklisted keys Official example _.omit({name, age, userid}, "userid")
Parameters
Parameter
Description
object
Required. Source to copy from
*keys / array
Optional. Property names to blacklist
predicate
Optional. (value, key, object) → true means drop
Return Value
Return Value
Description
*
New object without omitted keys
Underscore.js Examples
Example 1 — Official: Drop userid
The docs remove one blacklisted key and keep everything else.
Choose. Prefer omit when the drop list is shorter; pick when the keep list is shorter.
Compatibility
Browser & Runtime Support
_.omit ships with Underscore.js (1.x). It runs anywhere Underscore runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install underscore. On modern engines you can approximate key lists with object rest, but Underscore remains handy for arrays of keys and predicates.
✓ Stable · Underscore 1.x
_.omit()
Available in [email protected] (UMD / ESM). Works in evergreen browsers and current Node LTS when Underscore is loaded.
100%With Underscore 1.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
_.omitUnderscore 1.x+
Bottom line: Safe for production once Underscore is on the page or in your bundle. Not a native browser API by itself — load Underscore first. Prefer a pinned CDN version (e.g. [email protected]).
Frequently Asked Questions
_.omit(object, *keys) returns a copy of the object with the blacklisted keys removed. Official example: _.omit({name: 'moe', age: 50, userid: 'moe1'}, 'userid') returns {name: 'moe', age: 50}.
No. It returns a new object. The source is left untouched.
They are opposites. _.omit removes the keys you name (blacklist). _.pick keeps only the keys you name (whitelist).
Yes. A predicate (value, key, object) drops every property for which it returns true — useful to omit by type or pattern.
Missing keys are ignored. No error is thrown.
No. It is a stable Underscore object helper. Load Underscore 1.x and call _.omit(object, *keys).