$ cnpm install pick-values
Pick an array of values out of an object.
var pickValues = require('pick-values');
var result = pickValues({ hello: 'world', foo: 'bar' }, ['hello', 'foo']);
//-> ['world', 'bar']
pickValues(object, keys)
Takes an object
and an array (or single string) of keys
. Returns an ordered array of values from each of the specified keys.
MIT
Copyright 2014 - 2017 © taobao.org |