summaryrefslogtreecommitdiff
path: root/node_modules/core-js/modules/_is-regexp.js
blob: 55b2c629c9c82ac0cef7f7628eb470b34b594a33 (plain)
1
2
3
4
5
6
7
8
// 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');
};