main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
402 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict';
|
---|
| 2 | var fails = require('../internals/fails');
|
---|
| 3 | var global = require('../internals/global');
|
---|
| 4 |
|
---|
| 5 | // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
---|
| 6 | var $RegExp = global.RegExp;
|
---|
| 7 |
|
---|
| 8 | module.exports = fails(function () {
|
---|
| 9 | var re = $RegExp('(?<a>b)', 'g');
|
---|
| 10 | return re.exec('b').groups.a !== 'b' ||
|
---|
| 11 | 'b'.replace(re, '$<a>c') !== 'bc';
|
---|
| 12 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.