8 lines
295 B
JavaScript
8 lines
295 B
JavaScript
|
// 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');
|
||
|
};
|