Socket
Socket
Sign inDemoInstall

object.omit

Package Overview
Dependencies
3
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    object.omit

Return a copy of an object without the given keys.


Version published
Weekly downloads
2.5M
increased by4.19%
Maintainers
1
Install size
30.0 kB
Created
Weekly downloads
 

Readme

Source

object.omit NPM version

Return a copy of an object without the given keys.

Install

Install with npm:
npm i object.omit --save-dev

Run tests

npm test

Usage

var omit = require('object.omit');

Pass a string key to omit:

omit({a: 'a', b: 'b', c: 'c'}, 'a')
//=> { b: 'b', c: 'c' }

Pass an array of keys to omit:

omit({a: 'a', b: 'b', c: 'c'}, ['a', 'c'])
//=> { b: 'b' }

Returns the object if no keys are passed:

omit({a: 'a', b: 'b', c: 'c'})
//=> {a: 'a', b: 'b', c: 'c'}

Returns an empty object if no value is passed.

omit()
//=> {}

Author

Jon Schlinkert

Other javascript/node.js utils

Other projects that I maintain:

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license


This file was generated by verb-cli on October 25, 2014.

Keywords

FAQs

Last updated on 25 Oct 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc