3.0.0 • Published 7 years ago
omit.keys v3.0.0
omit.keys
Returns a new object without the blacklisted properties
api
const omit = require('omit.keys')
omit(object, list of strings)
example
const omit = require('omit.keys')
// example 1
const package = require('./package.json')
const filter = omit(package, 'version', 'name')
// should have all the properties from the package.json file
// without the properties "version" & "name"
// example 2
const value = omit({desc: 'hey', value: 'Hello World'}, 'desc')
// should return {value: 'Hello World'}