Created
January 20, 2022 16:37
-
-
Save JohnMarkT/11d9942926a4417cdf70797b91b5666d to your computer and use it in GitHub Desktop.
Case insensitive match
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ciMatch(prop = '', str = '') { | |
return str.localeCompare(prop, 'en', { sensitivity: 'base' }) === 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment