core-js 2.5.2 → 2.5.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.5.2' };
1
+ var core = module.exports = { version: '2.5.3' };
2
2
  if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
@@ -30,7 +30,7 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE
30
30
  var VALUES_BUG = false;
31
31
  var proto = Base.prototype;
32
32
  var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
33
- var $default = $native || getMethod(DEFAULT);
33
+ var $default = (!BUGGY && $native) || getMethod(DEFAULT);
34
34
  var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
35
35
  var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
36
36
  var methods, key, IteratorPrototype;
@@ -0,0 +1,4 @@
1
+ var global = require('./_global');
2
+ var navigator = global.navigator;
3
+
4
+ module.exports = navigator && navigator.userAgent || '';
@@ -104,14 +104,7 @@ var onUnhandled = function (promise) {
104
104
  });
105
105
  };
106
106
  var isUnhandled = function (promise) {
107
- if (promise._h == 1) return false;
108
- var chain = promise._a || promise._c;
109
- var i = 0;
110
- var reaction;
111
- while (chain.length > i) {
112
- reaction = chain[i++];
113
- if (reaction.fail || !isUnhandled(reaction.promise)) return false;
114
- } return true;
107
+ return promise._h !== 1 && (promise._a || promise._c).length === 0;
115
108
  };
116
109
  var onHandleUnhandled = function (promise) {
117
110
  task.call(global, function () {
@@ -216,7 +216,7 @@ $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
216
216
  $replacer = replacer = args[1];
217
217
  if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
218
218
  if (!isArray(replacer)) replacer = function (key, value) {
219
- if ($replacer) value = $replacer.call(this, key, value);
219
+ if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
220
220
  if (!isSymbol(value)) return value;
221
221
  };
222
222
  args[1] = replacer;
@@ -2,8 +2,10 @@
2
2
  // https://github.com/tc39/proposal-string-pad-start-end
3
3
  var $export = require('./_export');
4
4
  var $pad = require('./_string-pad');
5
+ var userAgent = require('./_user-agent');
5
6
 
6
- $export($export.P, 'String', {
7
+ // https://github.com/zloirock/core-js/issues/280
8
+ $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
7
9
  padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
8
10
  return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
9
11
  }
@@ -2,8 +2,10 @@
2
2
  // https://github.com/tc39/proposal-string-pad-start-end
3
3
  var $export = require('./_export');
4
4
  var $pad = require('./_string-pad');
5
+ var userAgent = require('./_user-agent');
5
6
 
6
- $export($export.P, 'String', {
7
+ // https://github.com/zloirock/core-js/issues/280
8
+ $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
7
9
  padStart: function padStart(maxLength /* , fillString = ' ' */) {
8
10
  return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
9
11
  }
@@ -1,9 +1,9 @@
1
1
  // ie9- setTimeout & setInterval additional parameters fix
2
2
  var global = require('./_global');
3
3
  var $export = require('./_export');
4
- var navigator = global.navigator;
4
+ var userAgent = require('./_user-agent');
5
5
  var slice = [].slice;
6
- var MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
6
+ var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
7
7
  var wrap = function (set) {
8
8
  return function (fn, time /* , ...args */) {
9
9
  var boundArgs = arguments.length > 2;
package/modules/_core.js CHANGED
@@ -1,2 +1,2 @@
1
- var core = module.exports = { version: '2.5.2' };
1
+ var core = module.exports = { version: '2.5.3' };
2
2
  if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
@@ -30,7 +30,7 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE
30
30
  var VALUES_BUG = false;
31
31
  var proto = Base.prototype;
32
32
  var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
33
- var $default = $native || getMethod(DEFAULT);
33
+ var $default = (!BUGGY && $native) || getMethod(DEFAULT);
34
34
  var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
35
35
  var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
36
36
  var methods, key, IteratorPrototype;
@@ -0,0 +1,4 @@
1
+ var global = require('./_global');
2
+ var navigator = global.navigator;
3
+
4
+ module.exports = navigator && navigator.userAgent || '';
@@ -104,14 +104,7 @@ var onUnhandled = function (promise) {
104
104
  });
105
105
  };
106
106
  var isUnhandled = function (promise) {
107
- if (promise._h == 1) return false;
108
- var chain = promise._a || promise._c;
109
- var i = 0;
110
- var reaction;
111
- while (chain.length > i) {
112
- reaction = chain[i++];
113
- if (reaction.fail || !isUnhandled(reaction.promise)) return false;
114
- } return true;
107
+ return promise._h !== 1 && (promise._a || promise._c).length === 0;
115
108
  };
116
109
  var onHandleUnhandled = function (promise) {
117
110
  task.call(global, function () {
@@ -216,7 +216,7 @@ $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
216
216
  $replacer = replacer = args[1];
217
217
  if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
218
218
  if (!isArray(replacer)) replacer = function (key, value) {
219
- if ($replacer) value = $replacer.call(this, key, value);
219
+ if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
220
220
  if (!isSymbol(value)) return value;
221
221
  };
222
222
  args[1] = replacer;
@@ -2,8 +2,10 @@
2
2
  // https://github.com/tc39/proposal-string-pad-start-end
3
3
  var $export = require('./_export');
4
4
  var $pad = require('./_string-pad');
5
+ var userAgent = require('./_user-agent');
5
6
 
6
- $export($export.P, 'String', {
7
+ // https://github.com/zloirock/core-js/issues/280
8
+ $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
7
9
  padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
8
10
  return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
9
11
  }
@@ -2,8 +2,10 @@
2
2
  // https://github.com/tc39/proposal-string-pad-start-end
3
3
  var $export = require('./_export');
4
4
  var $pad = require('./_string-pad');
5
+ var userAgent = require('./_user-agent');
5
6
 
6
- $export($export.P, 'String', {
7
+ // https://github.com/zloirock/core-js/issues/280
8
+ $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
7
9
  padStart: function padStart(maxLength /* , fillString = ' ' */) {
8
10
  return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
9
11
  }
@@ -1,9 +1,9 @@
1
1
  // ie9- setTimeout & setInterval additional parameters fix
2
2
  var global = require('./_global');
3
3
  var $export = require('./_export');
4
- var navigator = global.navigator;
4
+ var userAgent = require('./_user-agent');
5
5
  var slice = [].slice;
6
- var MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
6
+ var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
7
7
  var wrap = function (set) {
8
8
  return function (fn, time /* , ...args */) {
9
9
  var boundArgs = arguments.length > 2;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "core-js",
3
3
  "description": "Standard library",
4
- "version": "2.5.2",
4
+ "version": "2.5.3",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/zloirock/core-js.git"