pluck.js 238 B

123456789
  1. var map = require('./map.js');
  2. var property = require('./property.js');
  3. // Convenience version of a common use case of `_.map`: fetching a property.
  4. function pluck(obj, key) {
  5. return map(obj, property(key));
  6. }
  7. module.exports = pluck;