github-pages-deploy-action/node_modules/core-js-pure/internals/correct-is-regexp-logic.js

16 lines
356 B
JavaScript
Raw Normal View History

2020-03-07 11:45:40 +08:00
var wellKnownSymbol = require('../internals/well-known-symbol');
var MATCH = wellKnownSymbol('match');
module.exports = function (METHOD_NAME) {
var regexp = /./;
try {
'/./'[METHOD_NAME](regexp);
} catch (e) {
try {
regexp[MATCH] = false;
return '/./'[METHOD_NAME](regexp);
} catch (f) { /* empty */ }
} return false;
};