projecte_ionic/node_modules/core-js-pure/internals/regexp-unsupported-ncg.js
2022-02-09 18:30:03 +01:00

12 lines
388 B
JavaScript
Executable file

var fails = require('../internals/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';
});