Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying undefined as the object for .get() and .has() #58

Merged
merged 2 commits into from
Nov 1, 2019

Conversation

LinusU
Copy link
Contributor

@LinusU LinusU commented Oct 31, 2019

e.g.

> dotProp.get(undefined, 'a')
undefined

> dotProp.get(undefined, 'a', 'b')
'b'

Copy link
Collaborator

@stevemao stevemao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sindresorhus
Copy link
Owner

Shouldn't we allow undefined for .has() too then?

@sindresorhus
Copy link
Owner

And support for undefined needs to be documented in the readme under get and has.

@LinusU
Copy link
Contributor Author

LinusU commented Nov 1, 2019

@sindresorhus fixed 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants