JavaScript a intégré Funcctions pour correspondre au mot et retourner booléen

String.prototype.isMatch = function(s){
   return this.match(s)!==null 
}
Anxious Anteater