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

New is* snippets need to convert to boolean #111

Closed
atomiks opened this issue Dec 14, 2017 · 2 comments · Fixed by #130
Closed

New is* snippets need to convert to boolean #111

atomiks opened this issue Dec 14, 2017 · 2 comments · Fixed by #130

Comments

@atomiks
Copy link
Contributor

atomiks commented Dec 14, 2017

Current:

const isArray = val => val && Array.isArray(val);
// isArray(null) -> null (not false)

Use:

const isArray = val => !!val && Array.isArray(val);
// isArray(null) -> false
@Chalarangelo
Copy link
Owner

PR it! I wrote them quite hastily!

@lock
Copy link

lock bot commented Dec 18, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for any follow-up tasks.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants