Closed jacklaurencegaray closed 4 years ago
Hi Jack, thanks for the suggestion.
I don't think adding a warning message in this module would be a good idea. Think about if every module print warnings, our console would become very noisy and verbose.
Lower level modules usually only print necessary warnings for critical issues (such as api deprecate), input check can be done in upper level (applications). We have validateLanguageCode
and validateCountryCode
to help users check their input.
Right now, most conversions return an empty string on invalid input. I think it would be helpful to log a warning message through the console in case of invalid input.
Let me know if this is fine. Would love to issue a PR for this feature.