You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
380 B
17 lines
380 B
'use strict';
|
|
var wellKnownSymbol = require('../internals/well-known-symbol');
|
|
|
|
var MATCH = wellKnownSymbol('match');
|
|
|
|
module.exports = function (METHOD_NAME) {
|
|
var regexp = /./;
|
|
try {
|
|
'/./'[METHOD_NAME](regexp);
|
|
} catch (error1) {
|
|
try {
|
|
regexp[MATCH] = false;
|
|
return '/./'[METHOD_NAME](regexp);
|
|
} catch (error2) { /* empty */ }
|
|
} return false;
|
|
};
|