PageRenderTime 65ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/atom.symlink/packages/atom-lint/node_modules/xml2js/node_modules/xmlbuilder/node_modules/lodash-node/compat/collections/pluck.js

https://github.com/joshua/dotfiles
JavaScript | 33 lines | 3 code | 2 blank | 28 comment | 0 complexity | 6f747cc38388b4808368fa5919423f31 MD5 | raw file
Possible License(s): BSD-3-Clause, MPL-2.0-no-copyleft-exception, GPL-2.0, JSON, Apache-2.0
  1. /**
  2. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  3. * Build: `lodash modularize exports="node" -o ./compat/`
  4. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  5. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  6. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  7. * Available under MIT license <http://lodash.com/license>
  8. */
  9. var map = require('./map');
  10. /**
  11. * Retrieves the value of a specified property from all elements in the collection.
  12. *
  13. * @static
  14. * @memberOf _
  15. * @type Function
  16. * @category Collections
  17. * @param {Array|Object|string} collection The collection to iterate over.
  18. * @param {string} property The name of the property to pluck.
  19. * @returns {Array} Returns a new array of property values.
  20. * @example
  21. *
  22. * var characters = [
  23. * { 'name': 'barney', 'age': 36 },
  24. * { 'name': 'fred', 'age': 40 }
  25. * ];
  26. *
  27. * _.pluck(characters, 'name');
  28. * // => ['barney', 'fred']
  29. */
  30. var pluck = map;
  31. module.exports = pluck;