backoffice/node_modules/core-js/modules/_is-regexp.js

8 lines
292 B
JavaScript
Raw Normal View History

2020-02-06 10:09:39 +00:00
// 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');
};