Skip to content

The doc for $.isEmptyObject() is not correct #51

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

Closed
simevidas opened this issue Aug 4, 2012 · 0 comments
Closed

The doc for $.isEmptyObject() is not correct #51

simevidas opened this issue Aug 4, 2012 · 0 comments

Comments

@simevidas
Copy link

The documentation - http://api.jquery.com/jQuery.isEmptyObject/ - states:

Description: Check to see if an object is empty (contains no properties).

This description is not correct. The function in question returns true if the given object doesn't contain any enumerable properties. However, the object may contain non-enumerable properties, and the function in question will in that case still return true.

This fact contradicts with the description in the docs, which states that the function returns true only if the given object doesn't contain any properties.

The description should at least state "(contains no enumerable properties)".

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

No branches or pull requests

2 participants