You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
436 B
13 lines
436 B
2 years ago
|
var isObject = require('../internals/is-object');
|
||
|
var classof = require('../internals/classof-raw');
|
||
|
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||
|
|
||
|
var MATCH = wellKnownSymbol('match');
|
||
|
|
||
|
// `IsRegExp` abstract operation
|
||
|
// https://tc39.es/ecma262/#sec-isregexp
|
||
|
module.exports = function (it) {
|
||
|
var isRegExp;
|
||
|
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
|
||
|
};
|