index.js
/**
* Verify if a given value matches a given regular expression pattern.
*
* @public
* @since 0.1.0
* @param {!Number|String} value - The value to be validated.
* @param {!String} pattern - The regular expression pattern in a format accepted by HTML5 validation rules.
* @return {Boolean}
*
* @example
* var isValueValid = defy.pattern('GBR', '[A-Za-z]{3}')
*/
Verify if a given value matches a given regular expression pattern.
Verify if a given value matches a given regular expression pattern .
function pattern (value, pattern) {
  const regEx = new RegExp(pattern)
  return regEx.test(value)
}
function pattern ( value , pattern ) { const regEx = new RegExp ( pattern ) return regEx . test ( value ) }
Verify if a given value matches a given regular expression pattern.
Verify if a given value matches a given regular expression pattern .