徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
310 B

5 months ago
var map = require('./map')
var property = require('./property')
/**
* 获取数组对象中某属性值返回一个数组
*
* @param {Array} array 数组
* @param {String} key 属性值
* @return {Array}
*/
function pluck (obj, key) {
return map(obj, property(key))
}
module.exports = pluck