pick-object-alias
v1.0.1
Published
pick and rename the key composition a new object
Downloads
3
Readme
pick-object-alias
pick and rename the key composition a new object
demo
import pick from 'pick-object-alias'
//or
let pick = require('pick-object-alias')
pick({a:1,b:'hello',c:'car'},['a'])
//return { a: 1 }
pick({a:1,b:'hello',c:'car'},['d'])
//return { d: undefined }
pick({a:1,b:'hello',c:'car'},['b','mycar as c'])
//return { b: 'hello', mycar: 'car' }