source: trip-planner-front/node_modules/core-js/internals/regexp-sticky-helpers.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 489 bytes
Line 
1var fails = require('../internals/fails');
2
3// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
4var RE = function (s, f) {
5 return RegExp(s, f);
6};
7
8exports.UNSUPPORTED_Y = fails(function () {
9 var re = RE('a', 'y');
10 re.lastIndex = 2;
11 return re.exec('abcd') != null;
12});
13
14exports.BROKEN_CARET = fails(function () {
15 // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
16 var re = RE('^r', 'gy');
17 re.lastIndex = 2;
18 return re.exec('str') != null;
19});
Note: See TracBrowser for help on using the repository browser.