text: 'use strict';
  
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  
  var has = require('has');
  var regexExec = RegExp.prototype.exec;
  var gOPD = Object.getOwnPropertyDescriptor;
  
  var tryRegexExecCall = function tryRegexExec(value) {
  	try {
  		var lastIndex = value.lastIndex;
  		value.lastIndex = 0;
  
  		regexExec.call(value);
  		return true;
  	} catch (e) {
  		return false;
  	} finally {
  		value.lastIndex = lastIndex;
  	}
  };
  var toStr = Object.prototype.toString;
  var regexClass = '[object RegExp]';
  var hasToStringTag = typeof Symbol === 'function' && _typeof(Symbol.toStringTag) === 'symbol';
  
  module.exports = function isRegex(value) {
  	if (!value || (typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== 'object') {
  		return false;
  	}
  	if (!hasToStringTag) {
  		return toStr.call(value) === regexClass;
  	}
  
  	var descriptor = gOPD(value, 'lastIndex');
  	var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
  	if (!hasLastIndexDataProperty) {
  		return false;
  	}
  
  	return tryRegexExecCall(value);
  };