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.
14 lines
451 B
14 lines
451 B
'use strict';
|
|
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');
|
|
};
|