source: imaps-frontend/node_modules/es-abstract/2024/IsRegExp.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 540 bytes
RevLine 
[d565449]1'use strict';
2
3var GetIntrinsic = require('get-intrinsic');
4
5var $match = GetIntrinsic('%Symbol.match%', true);
6
7var hasRegExpMatcher = require('is-regex');
8
9var ToBoolean = require('./ToBoolean');
10
11// https://262.ecma-international.org/6.0/#sec-isregexp
12
13module.exports = function IsRegExp(argument) {
14 if (!argument || typeof argument !== 'object') {
15 return false;
16 }
17 if ($match) {
18 var isRegExp = argument[$match];
19 if (typeof isRegExp !== 'undefined') {
20 return ToBoolean(isRegExp);
21 }
22 }
23 return hasRegExpMatcher(argument);
24};
Note: See TracBrowser for help on using the repository browser.