amis-rpc-design/node_modules/core-js/internals/regexp-unsupported-ncg.js
2023-10-07 19:42:30 +08:00

13 lines
402 B
JavaScript

'use strict';
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';
});