mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
16 lines
356 B
JavaScript
16 lines
356 B
JavaScript
|
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;
|
||
|
};
|