You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
292 B
JavaScript
8 lines
292 B
JavaScript
7 years ago
|
// 7.2.8 IsRegExp(argument)
|
||
|
var isObject = require('./_is-object')
|
||
|
, cof = require('./_cof')
|
||
|
, MATCH = require('./_wks')('match');
|
||
|
module.exports = function(it){
|
||
|
var isRegExp;
|
||
|
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
|
||
|
};
|