Skip to content

_.find result not consistent with Underscore.js #15

@Guiswa

Description

@Guiswa

See jsfiddle here: http://jsfiddle.net/Ln9xc/2/

Underscore.js behaves like so:

_([1,2,3,4]).find(function(i) { return i === 5 }); // returns undefined

While Lo-Dash returns the entire list if it can't find a match:

_([1,2,3,4]).find(function(i) { return i === 5 }); // returns [1,2,3,4]

This was unexpected for me. If this is desired behavior, perhaps add a note?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions