mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add fuzzyMatchesWholeWord
This commit is contained in:
parent
39977a4646
commit
73ea1fc8a0
1 changed files with 3 additions and 0 deletions
|
|
@ -4,6 +4,9 @@ export function matchesWholeWord (needle, haystack) {
|
|||
return new RegExp('\\b' + needle + '\\b').test(haystack)
|
||||
}
|
||||
|
||||
export function fuzzyMatchesWholeWord (needle, haystack) {
|
||||
return matchesWholeWord ( needle.toLowerCase() , haystack.toLowerCase() )
|
||||
}
|
||||
|
||||
export function eitherMatches (stringARaw, stringBRaw) {
|
||||
// Make strings lowercase for more generous comparison
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue