.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / internals / regexp-sticky-helpers.js
1 'use strict';
2
3 var fails = require('./fails');
4
5 // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
6 // so we use an intermediate function.
7 function RE(s, f) {
8   return RegExp(s, f);
9 }
10
11 exports.UNSUPPORTED_Y = fails(function () {
12   // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
13   var re = RE('a', 'y');
14   re.lastIndex = 2;
15   return re.exec('abcd') != null;
16 });
17
18 exports.BROKEN_CARET = fails(function () {
19   // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
20   var re = RE('^r', 'gy');
21   re.lastIndex = 2;
22   return re.exec('str') != null;
23 });