massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / internals / regexp-unsupported-ncg.js
1 var fails = require('../internals/fails');
2 var global = require('../internals/global');
3
4 // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
5 var $RegExp = global.RegExp;
6
7 module.exports = fails(function () {
8   var re = $RegExp('(?<a>b)', 'g');
9   return re.exec('b').groups.a !== 'b' ||
10     'b'.replace(re, '$<a>c') !== 'bc';
11 });