Add pluck() #16

caolan opened this Issue Feb 16, 2014 · 1 comment

2 participants


Given a property name and a stream of objects, return a new stream of those property values.

var docs = _([
    {type: 'blogpost', title: 'foo'},
    {type: 'blogpost', title: 'bar'},
    {type: 'asdf', title: 'baz'}

docs.pluck('title').toArray(function (xs) {
    // xs is now ['foo', 'bar', 'baz']
@caolan caolan added the starter label Feb 16, 2014

I believe pluck() has been added now, and this can be closed.

@caolan caolan closed this Mar 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment