pluck-key-values

Pluck the values of an array of keys from an object (order is preserved)

Usage no npm install needed!

<script type="module">
  import pluckKeyValues from 'https://cdn.skypack.dev/pluck-key-values';
</script>

README

Pluck key values

Pluck the values of an array of keys from an object (order is preserved)

usage

var pluckKeyValues = require('pluck-key-values');

pluckKeyValues({
    firstName: 'Simon',
    lastName: 'Bells',
    age: 28,
}, [ 'age', 'firstName' ]); // [ 28, 'Simon' ]

License

MIT © Thomas Jensen