Last change
on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
436 bytes
|
Line | |
---|
1 | var isObject = require('../internals/is-object');
|
---|
2 | var classof = require('../internals/classof-raw');
|
---|
3 | var wellKnownSymbol = require('../internals/well-known-symbol');
|
---|
4 |
|
---|
5 | var MATCH = wellKnownSymbol('match');
|
---|
6 |
|
---|
7 | // `IsRegExp` abstract operation
|
---|
8 | // https://tc39.es/ecma262/#sec-isregexp
|
---|
9 | module.exports = function (it) {
|
---|
10 | var isRegExp;
|
---|
11 | return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
|
---|
12 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.