Skip to content

has() should use Object.prototype.hasOwnProperty()  #572

@vibl

Description

@vibl

Currently in Rambda, has() checks whether the value is undefined, which is not what the doc says it does ("It returns true if obj has property prop.").

Instead, has() should use Object.prototype.hasOwnProperty(), as it does in Ramda. I have been bitten by this undocumented incompatibility.

Also, for reference, in Lodash, _.has({a: undefined}, 'a') === true

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions