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

isEmpty #2788

Closed
githublyp opened this issue Nov 3, 2018 · 3 comments
Closed

isEmpty #2788

githublyp opened this issue Nov 3, 2018 · 3 comments

Comments

@githublyp
Copy link

_.isEmpty(11)
true
_.isEmpty(''+11)

false

@LuigiC
Copy link

LuigiC commented Nov 13, 2018

But I don't think this can be considered an issue, since ''+11 is equivalent to '11', and therefore not empty.

@skynin
Copy link

skynin commented Nov 26, 2018

from doc
_.isEmpty(object) ... Returns true if an enumerable object ... For strings and array-like objects _.isEmpty checks if the length property is 0.

11 is not object, and has no the length property
'11' is string and has the length property

@jgonggrijp
Copy link
Collaborator

Seems to be resolved.

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

4 participants