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.
- package/CHANGELOG.md +3 -0
- package/README.md +62 -62
- package/bower.json +1 -1
- package/client/core.js +82 -80
- package/client/core.min.js +4 -4
- package/client/core.min.js.map +1 -1
- package/client/library.js +2 -2
- package/client/library.min.js +2 -2
- package/client/shim.js +16 -14
- package/client/shim.min.js +4 -4
- package/client/shim.min.js.map +1 -1
- package/library/modules/_core.js +1 -1
- package/modules/_core.js +1 -1
- package/modules/es6.regexp.split.js +9 -7
- package/package.json +1 -1
package/library/modules/_core.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var core = module.exports = { version: '2.6.
|
|
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.
|
|
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
|
-
//
|
|
17
|
-
var SUPPORTS_Y =
|
|
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 ?
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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 ?
|
|
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;
|