// Match whole word export function matchesWholeWord (needle, haystack) { return new RegExp('\\b' + needle + '\\b').test(haystack) }