is-regex
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -5,3 +5,3 @@ 'use strict'; | ||
module.exports = function isRegex(value) { | ||
var tryRegexExec = function tryRegexExec(value) { | ||
try { | ||
@@ -15,1 +15,5 @@ regexExec.call(value); | ||
module.exports = function isRegex(value) { | ||
if (typeof value !== 'object') { return false; } | ||
return tryRegexExec(value); | ||
}; |
{ | ||
"name": "is-regex", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag", | ||
@@ -34,3 +34,4 @@ "author": "Jordan Harband", | ||
"covert": "1.0.0", | ||
"jscs": "~1.10.0" | ||
"jscs": "~1.10.0", | ||
"semver": "~4.2.0" | ||
}, | ||
@@ -37,0 +38,0 @@ "testling": { |
11599
10
75
4