-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: add isNullish
function
#277
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR, @ilxqx. Just one thing: for functions that have type assertions, it's a good idea to include a type test to ensure that the types are working correctly. You can create the |
@ilxqx I find some lint errors in your changes, please run the @aleclarson The strange part is the CI catches the error, but they do not show the error in the check result. I'm going to try to find the CI problem |
Hey @ilxqx, you should be able to run |
@MarlonPassos-git I have added type test for |
I have run |
I would suggest that the docs mention that |
@aeharding That's personally what I use, but it is somewhat prone to hard-to-debug typos, since people have a muscle memory for strict equals ( |
Hey! There's a new requirement for PRs that introduce new features. Without this requirement met, we won't be able to merge this. Note that this PR can still be included in a
|
Benchmark Results
Performance regressions of 30% or more should be investigated, unless they were anticipated. Smaller regressions may be due to normal variability, as we don't use dedicated CI infrastructure. |
Tip
The owner of this PR can publish a preview release by commenting
/publish
in this PR. Afterwards, anyone can try it out by runningpnpm add radashi@pr<PR_NUMBER>
.Summary
Add
isNullish
function to check if the given value isnull
orundefined
Related issue, if any:
For any code change,
Does this PR introduce a breaking change?
No
Bundle impact
src/typed/isNullish.ts
Footnotes
Function size includes the
import
dependencies of the function. ↩