Skip to content

vikramcse/exclude-keys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

exclude-keys

Return a copy of the object excluding the blacklisted properties

Install

$ npm install --save exclude-keys

Example

var exclude = require('exclude-keys');

var obj = {name: 'moe', age: 50, userid: 'moe1'};
console.log(exclude(obj, 'userid'));
// -> { name: 'moe', age: 50 }

var obj = {name: 'moe', age: 50, userid: 'moe1'};
console.log(exclude(obj, ['userid', 'name']));
// -> { age: 50 }

require('exclude-keys')(object, list)

Arguments:

  • object: Object
  • list: list of items to exclude from object

Returns: Return a copy of the object excluding the blacklisted properties

License

© 2016 vikram. MIT License

About

Return a copy of the object excluding the blacklisted properties

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published