object-omit

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

This package is deprecated, use object.omit instead
Last updated 11 years ago by jonschlinkert .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install object-omit 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.0.0                                ...           latest (11 years ago)

3 Versions

  • 1.0.0 [deprecated]           ...           11 years ago
  • 0.2.0 [deprecated]           ...           12 years ago
  • 0.1.1 [deprecated]           ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (2)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |