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

added strict equals for null input #1377

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

coloradude
Copy link

Currently any falsy value of a default option will resolve to an empty string. This fixes this behavior.

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.08%. Comparing base (0dfa6bd) to head (73ac1b3).
Report is 28 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1377      +/-   ##
==========================================
+ Coverage   94.46%   97.08%   +2.61%     
==========================================
  Files          53       53              
  Lines        4556     4600      +44     
  Branches      772      799      +27     
==========================================
+ Hits         4304     4466     +162     
+ Misses        247      132     -115     
+ Partials        5        2       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SBoudrias
Copy link
Owner

any falsy value

Well only null/undefined; not any falsy value unless I'm missing something. I'm not sure why we would want to allow undefined but not null.

Maybe it'd be best to check if the key was passed or not; 'default' in this.opt ? .... That way we would allow arbitrary default value.

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

Successfully merging this pull request may close these issues.

None yet

2 participants