DigitalConsumer.FixMyGlass/node_modules/core-js/internals/regexp-unsupported-ncg.js
2021-09-20 17:57:19 -04:00

11 lines
377 B
JavaScript

var fails = require('./fails');
var global = require('../internals/global');
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
var $RegExp = global.RegExp;
module.exports = fails(function () {
var re = $RegExp('(?<a>b)', 'g');
return re.exec('b').groups.a !== 'b' ||
'b'.replace(re, '$<a>c') !== 'bc';
});