JSFiddle - React, Tailwind, and code Playground

JavaScript

var myHilitor = new Hilitor();
myHilitor.apply();
myHilitor.setMatchType("exact");




function Hilitor()
{
  var excat;
 
  this.setMatchType = function(type)
  {
     if(type == "exact"){window.excat = true;} 

  };

  this.setRegex = function(input)
  {
	
   alert(excat);
  
  };

  this.apply = function(input)
  {

      this.setRegex();

  };

}