Mathias Bynens mathiasb at
Tue May 13 23:48:53 PDT 2014

Previous discussion on this topic:

We should look at how existing utility libraries handle this behavior and base any proposals on that IMHO. Underscore and Lo-Dash have [`_.first`]( and [`_.last`](, which both take an optional `callback` parameter, in which case all the first/last `n` elements for which `callback` returns a truthy value are returned. This seems like a sensible thing to add to the proposal.

More information about the es-discuss mailing list