Inquirer.js icon indicating copy to clipboard operation
Inquirer.js copied to clipboard

added strict equals for null input

Open coloradude opened this issue 1 year ago • 2 comments

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

coloradude avatar Mar 29 '24 10:03 coloradude

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 29 '24 10:03 codecov[bot]

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.

SBoudrias avatar Mar 29 '24 19:03 SBoudrias