We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa3ea0f commit a9e333eCopy full SHA for a9e333e
index.js
@@ -14,7 +14,7 @@ var regexClass = '[object RegExp]';
14
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
15
16
module.exports = function isRegex(value) {
17
- if (typeof value !== 'object') {
+ if (!value || typeof value !== 'object') {
18
return false;
19
}
20
return hasToStringTag ? tryRegexExecCall(value) : toStr.call(value) === regexClass;
0 commit comments