core-js 2.6.2 → 2.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- var core = module.exports = { version: '2.6.2' };
1
+ var core = module.exports = { version: '2.6.3' };
2
2
  if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
package/modules/_core.js CHANGED
@@ -1,2 +1,2 @@
1
- var core = module.exports = { version: '2.6.2' };
1
+ var core = module.exports = { version: '2.6.3' };
2
2
  if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
@@ -7,14 +7,16 @@ var advanceStringIndex = require('./_advance-string-index');
7
7
  var toLength = require('./_to-length');
8
8
  var callRegExpExec = require('./_regexp-exec-abstract');
9
9
  var regexpExec = require('./_regexp-exec');
10
+ var fails = require('./_fails');
10
11
  var $min = Math.min;
11
12
  var $push = [].push;
12
13
  var $SPLIT = 'split';
13
14
  var LENGTH = 'length';
14
15
  var LAST_INDEX = 'lastIndex';
16
+ var MAX_UINT32 = 0xffffffff;
15
17
 
16
- // eslint-disable-next-line no-empty
17
- var SUPPORTS_Y = !!(function () { try { return new RegExp('x', 'y'); } catch (e) {} })();
18
+ // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
19
+ var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });
18
20
 
19
21
  // @@split logic
20
22
  require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split, maybeCallNative) {
@@ -39,7 +41,7 @@ require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split, maybeCall
39
41
  (separator.unicode ? 'u' : '') +
40
42
  (separator.sticky ? 'y' : '');
41
43
  var lastLastIndex = 0;
42
- var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
44
+ var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0;
43
45
  // Make `global` and avoid `lastIndex` issues by working with a copy
44
46
  var separatorCopy = new RegExp(separator.source, flags + 'g');
45
47
  var match, lastIndex, lastLength;
@@ -93,14 +95,14 @@ require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split, maybeCall
93
95
 
94
96
  var unicodeMatching = rx.unicode;
95
97
  var flags = (rx.ignoreCase ? 'i' : '') +
96
- (rx.multiline ? 'm' : '') +
97
- (rx.unicode ? 'u' : '') +
98
- (SUPPORTS_Y ? 'y' : 'g');
98
+ (rx.multiline ? 'm' : '') +
99
+ (rx.unicode ? 'u' : '') +
100
+ (SUPPORTS_Y ? 'y' : 'g');
99
101
 
100
102
  // ^(? + rx + ) is needed, in combination with some S slicing, to
101
103
  // simulate the 'y' flag.
102
104
  var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
103
- var lim = limit === undefined ? 0xffffffff : limit >>> 0;
105
+ var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
104
106
  if (lim === 0) return [];
105
107
  if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
106
108
  var p = 0;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "core-js",
3
3
  "description": "Standard library",
4
- "version": "2.6.2",
4
+ "version": "2.6.3",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/zloirock/core-js.git"