pluck.js 230 B

1234567891011
  1. define(['./map', './property'], function (map, property) {
  2. // Convenience version of a common use case of `_.map`: fetching a property.
  3. function pluck(obj, key) {
  4. return map(obj, property(key));
  5. }
  6. return pluck;
  7. });