object-reduce

A function that reduces an Object to match a specified list of keys.

object-reduce

object-reduce is a function that reduces an Object to match a specified list of keys.

npm install object-reduce
var reduce = require('object-reduce')
 
reduce({ a: 1, b: 2, c: 3 }, ['a', 'b'])
// => { a: 1, b: 2 } 
 
reduce({ d: 4, e: 5 }, 'e')
// => { e: 5 } 

MIT