-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
is.defined #52
Comments
What would be the expected behavior for |
To be |
The @ltetzlaff @SamVerschueren @brandon93s Thoughts? |
Thanks for considering it. I agree that there’s definitely some ambiguity, but on the other hand:
I found that the “double negative” of “not undefined” still makes me pause and re-read source code so was hoping to streamline it. |
I think it'd be too easy to accidentally misuse an
"Array-like" isn't the most well known term, but it does have a concrete definition in the community. It's used in the slice documents, for example. |
If we're seeking readability, how about a
Etc... |
@brandon93s I like the idea of |
Also note that |
@brandon93s this seems like the cleanest solution. I support it. At the same time, it is an answer to all use cases where you need to check a negative of an existing predicate. |
I'd probably not use it myself and just go with the good ol' Btw
and used pretty widely when "softly" referring to Enumerables but not Iterables or the like. |
I'm going to pass on this as it's too ambiguous. As for |
@sindresorhus How do you assert that a value is defined? |
@bartzy Assertions did not exist when this issue was discussed. It's generally better to open a new issue than to comment on a very old closed issue. |
Would you support a PR for is.defined? Clearer logic in downstream code than !is.undefined
The text was updated successfully, but these errors were encountered: