UNPKG

arr-pluck

Version:

Retrieves the value of a specified property from all elements in the collection.

15 lines (11 loc) 268 B
/*! * arr-pluck <https://github.com/jonschlinkert/arr-pluck> * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */ 'use strict'; var map = require('arr-map'); module.exports = function pluck(arr, prop) { return map(arr, prop); };