-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
hasOwnProperty #23
Comments
I think that's intentional. If we used
But so will |
It doesn't really do that though, I'm not saying that I just think that it's more useful if |
Yes. I definitely agree with that. |
duplicate of #11? |
@sindresorhus Do you want to ignore inherited properties? |
No |
isn't |
Yes, but it's Object.getOwnPropertyDescriptor(Object.prototype, 'hasOwnProperty');
/*
{
"writable": true,
"enumerable": false,
"configurable": true
}
*/ |
Hmm.. I'm just trying to understand this. I'm not enumerating the properties of an object.. I'm just trying to access it. |
@stevemao I think what Sindre is trying to say here is that if the descriptor tells us that it is not |
@SamVerschueren, I just think that enumerability should have nothing to do with accessibility... |
Right now dot-prop will return any property that isn't
undefined
. But as a potentially unintended consequence stuff likem.get({}, 'hasOwnProperty')
will return the non-enumerable method.Instead of checking just for
undefined
, maybe it should testobj.hasOwnProperty(prop)
.The text was updated successfully, but these errors were encountered: