pluck-keys

pick keys of object

npm install pluck-keys
6 downloads in the last week
6 downloads in the last month

pluck-keys

pick keys of object

Installation

// component
$ component install karlbohlmark/pluck-keys

// npm
$ npm install pluck-keys

API

pluckKeys = require('pluck-keys')

name = pluckKeys("firstname", "lastname")

var user = {
  email: "user@domain.com",
  firstname: "Azealia",
  lastname: "Banks",
  password: "yungrapunxel"
}

var nameProps = name(user) // { firstname: "Azealia", lastname: "Banks" }

License

MIT

npm loves you