1 var fails = require('../internals/fails');
2 var global = require('../internals/global');
4 // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
5 var $RegExp = global.RegExp;
7 var UNSUPPORTED_Y = fails(function () {
8 var re = $RegExp('a', 'y');
10 return re.exec('abcd') != null;
14 // https://github.com/zloirock/core-js/issues/1008
15 var MISSED_STICKY = UNSUPPORTED_Y || fails(function () {
16 return !$RegExp('a', 'y').sticky;
19 var BROKEN_CARET = UNSUPPORTED_Y || fails(function () {
20 // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
21 var re = $RegExp('^r', 'gy');
23 return re.exec('str') != null;
27 BROKEN_CARET: BROKEN_CARET,
28 MISSED_STICKY: MISSED_STICKY,
29 UNSUPPORTED_Y: UNSUPPORTED_Y