pick-object-alias

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i pick-object-alias

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

2.98 kB

Total Files

5

Last publish

Collaborators

  • tangentguo