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

more real .has method? #2

Closed
tunnckoCore opened this issue Feb 29, 2016 · 3 comments
Closed

more real .has method? #2

tunnckoCore opened this issue Feb 29, 2016 · 3 comments

Comments

@tunnckoCore
Copy link

Before was using has-value(s), now is just typeof val !== undefined

also add hasOwn and union methods?

@jonschlinkert
Copy link
Owner

this approach passed all of the tests of the other .has method, since it was effectively doing the same thing (at least in non-edge-cases).

add hasOwn and union methods?

I was just thinking the same thing about union today - I just refactored base-data and could have used it. we can add union but let me think about .hasOwn. Honestly I almost always use .get because I can get the same answer and use the resulting value if I need it, instead of doing two lookups (.has then .get)

@tunnckoCore
Copy link
Author

Honestly I almost always use .get

Mm yea, me too. But it's logical to have. I think it can be in help for some users that don't got the things as we got it.

@tunnckoCore
Copy link
Author

@jonschlinkert ping about the hasOwn and has.

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

No branches or pull requests

2 participants