package.cjs.pluck.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of underscore Show documentation
Show all versions of underscore Show documentation
JavaScript's functional programming helper library.
The newest version!
var map = require('./map.js');
var property = require('./property.js');
// Convenience version of a common use case of `_.map`: fetching a property.
function pluck(obj, key) {
return map(obj, property(key));
}
module.exports = pluck;