omit.keys

3.0.0 • Public • Published

omit.keys

Returns a new object without the blacklisted properties

Build StatusCode Coverage 100%ISC LicenseNodeJS

JavaScript Style Guide

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'}

Package Sidebar

Install

npm i omit.keys

Weekly Downloads

6

Version

3.0.0

License

ISC

Last publish

Collaborators

  • quim