code: function parseRegExp( str ) {
  	var re = regex( str );
  	if ( re === null ) {
  		return new TypeError( 'invalid value. Unable to parse string as a regular expression. Value: `' + str + '`.' );
  	}
  	return re;
  }
docs: PARSE REGEXP // 
  FUNCTION: parseRegExp( str )
  Parses a string as a regular expression.
  
  @param {String} str - string to parse
  @returns {RegExp|Error} parsed value or error object