8000 Feature Request: `_.isNotNill` or `_.isTruthy` · Issue #5763 · lodash/lodash · GitHub
[go: up one dir, main page]

Skip to content

Feature Request: _.isNotNill or _.isTruthy #5763

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

Open
ShawnFarsai opened this issue Oct 26, 2023 · 3 comments
Open

Feature Request: _.isNotNill or _.isTruthy #5763

ShawnFarsai opened this issue Oct 26, 2023 · 3 comments

Comments

@ShawnFarsai
Copy link

I work on react code a lot. and we often do !_.isNil(someState) && <div>my jsx</div>.

This is a little annoying to write and is a double negative. It's used a lot in react apps. and its an extra mental gymnastic

@masnormen
Copy link

Why not use !!someState && <div>my jsx</div> or Boolean(someState) && <div>my jsx</div>?

@ShawnFarsai
Copy link
Author

Those don't fly in typescript

@hmloftus
Copy link

Is this issue still open?

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

3 participants
0