diff --git a/helpers/matching.js b/helpers/matching.js index 3e56031..3894a47 100644 --- a/helpers/matching.js +++ b/helpers/matching.js @@ -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