added strict equals for null input
Currently any falsy value of a default option will resolve to an empty string. This fixes this behavior.
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.
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.