Javascript String contains(matcher)

Description

Javascript String contains(matcher)


String.prototype.contains = function(matcher) {
  const regex = new RegExp(matcher, 'i')
  return regex.test(this)
}



PreviousNext

Related