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

should dotProp.has({foo: undefined}, 'foo') be true ? #27

Closed
qiu8310 opened this issue Jul 1, 2016 · 5 comments
Closed

should dotProp.has({foo: undefined}, 'foo') be true ? #27

qiu8310 opened this issue Jul 1, 2016 · 5 comments

Comments

@qiu8310
Copy link

qiu8310 commented Jul 1, 2016

var a = {foo: undefined}

console.log(dotProp.has(a, 'foo'))  // false

console.log('foo' in a) // true
console.log(a.hasOwnProperty('foo'))  // true
@stevemao
Copy link
Collaborator

stevemao commented Jul 1, 2016

cc @thatjessicakelly

@sindresorhus
Copy link
Owner

Yes, that's a bug.

@stevemao
Copy link
Collaborator

@qiu8310 Can you try #29?

@qiu8310
Copy link
Author

qiu8310 commented Jul 19, 2016

I wrote a different version libs/lang/DotProp.js, and test file libs/lang/test/__DotProp.js.

Would you like to merge it?

@stevemao
Copy link
Collaborator

@qiu8310 if you can prove that implementation is better (we have good perf tests here) 😄

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

No branches or pull requests

3 participants