What happened to Lodash _.pluck?

Ah-ha! The Lodash Changelog says it all…

“Removed _.pluck in favor of _.map with iteratee shorthand”

var objects = [{ 'a': 1 }, { 'a': 2 }];

// in 3.10.1
_.pluck(objects, 'a'); // → [1, 2]
_.map(objects, 'a'); // → [1, 2]

// in 4.0.0
_.map(objects, 'a'); // → [1, 2]

Leave a Comment