This package has been deprecated

Author message:

This package is deprecated, use object.omit instead

object-omit

1.0.0 • Public • Published

object-omit NPM version

Return a copy of an object without the given key, or array of keys.

Install

Install with npm:

npm i object-omit --save-dev

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()
//=> {}

Runing tests

Install dev dependencies:

npm i -d && npm test

Author

Jon Schlinkert

Other javascript/node.js utils

Other projects that I maintain:

License

Copyright (c) 2014-2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb on February 13, 2015.

Package Sidebar

Install

npm i object-omit

Weekly Downloads

82

Version

1.0.0

License

none

Last publish

Collaborators

  • jonschlinkert