core-js-pure 3.0.0 → 3.1.2
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/README.md +7 -5
- package/es/index.js +2 -0
- package/es/instance/match-all.js +8 -0
- package/es/number/max-safe-integer.js +1 -1
- package/es/number/min-safe-integer.js +1 -1
- package/es/string/index.js +1 -0
- package/es/string/match-all.js +3 -0
- package/es/string/virtual/index.js +1 -0
- package/es/string/virtual/match-all.js +3 -0
- package/es/symbol/index.js +1 -0
- package/es/symbol/match-all.js +4 -0
- package/features/array/flat-map.js +1 -1
- package/features/array/flat.js +1 -1
- package/features/index.js +1 -1
- package/features/instance/match-all.js +1 -8
- package/features/object/index.js +1 -1
- package/features/string/index.js +1 -0
- package/features/string/match-all.js +2 -1
- package/features/string/virtual/index.js +1 -0
- package/features/string/virtual/match-all.js +2 -1
- package/features/symbol/index.js +1 -0
- package/features/symbol/match-all.js +1 -0
- package/features/symbol/replace-all.js +3 -0
- package/internals/call-with-safe-iteration-closing.js +2 -2
- package/internals/check-correctness-of-iteration.js +2 -2
- package/internals/classof.js +1 -1
- package/internals/fails.js +1 -1
- package/internals/flatten-into-array.js +1 -1
- package/internals/forced-object-prototype-accessors-methods.js +6 -2
- package/internals/forced-string-trim-method.js +1 -1
- package/internals/global.js +12 -3
- package/internals/hide.js +2 -1
- package/internals/ie8-dom-define.js +6 -2
- package/internals/internal-metadata.js +2 -1
- package/internals/microtask.js +3 -3
- package/internals/native-symbol.js +5 -3
- package/internals/native-url.js +2 -1
- package/internals/object-assign.js +7 -2
- package/internals/object-create.js +2 -1
- package/internals/object-define-property.js +1 -1
- package/internals/object-get-own-property-descriptor.js +1 -1
- package/internals/object-get-own-property-names-external.js +1 -1
- package/internals/object-set-prototype-of.js +2 -2
- package/internals/object-to-array.js +8 -3
- package/internals/parse-int.js +1 -1
- package/internals/perform.js +3 -3
- package/internals/punycode-to-ascii.js +3 -3
- package/internals/set-global.js +1 -1
- package/internals/shared.js +3 -2
- package/internals/sloppy-array-method.js +2 -2
- package/internals/string-at.js +3 -3
- package/internals/task.js +21 -11
- package/internals/to-length.js +1 -1
- package/internals/webkit-string-pad-bug.js +5 -0
- package/internals/whitespaces.js +1 -1
- package/modules/es.array.concat.js +1 -1
- package/modules/es.array.splice.js +1 -1
- package/modules/es.math.imul.js +2 -2
- package/modules/es.number.is-safe-integer.js +1 -1
- package/modules/es.number.max-safe-integer.js +1 -1
- package/modules/es.number.min-safe-integer.js +1 -1
- package/modules/es.object.get-own-property-names.js +1 -1
- package/modules/es.promise.js +15 -13
- package/modules/es.reflect.define-property.js +1 -1
- package/modules/es.reflect.prevent-extensions.js +1 -1
- package/modules/es.reflect.set-prototype-of.js +1 -1
- package/modules/es.string.from-code-point.js +2 -2
- package/modules/es.string.match-all.js +91 -0
- package/modules/es.string.pad-end.js +1 -4
- package/modules/es.string.pad-start.js +1 -4
- package/modules/es.symbol.js +11 -1
- package/modules/es.symbol.match-all.js +2 -0
- package/modules/esnext.math.imulh.js +1 -1
- package/modules/esnext.math.umulh.js +1 -1
- package/modules/esnext.number.from-string.js +1 -1
- package/modules/esnext.observable.js +12 -12
- package/modules/esnext.promise.all-settled.js +4 -2
- package/modules/esnext.promise.any.js +4 -2
- package/modules/esnext.promise.try.js +8 -6
- package/modules/esnext.string.match-all.js +3 -87
- package/modules/esnext.string.replace-all.js +37 -8
- package/modules/esnext.symbol.replace-all.js +3 -0
- package/modules/web.url-search-params.js +19 -1
- package/modules/web.url.js +32 -36
- package/package.json +5 -2
- package/proposals/string-match-all.js +3 -0
- package/proposals/string-replace-all.js +1 -0
- package/scripts/postinstall.js +12 -0
- package/stable/array/flat-map.js +1 -1
- package/stable/array/flat.js +1 -1
- package/stable/instance/match-all.js +1 -0
- package/stable/object/index.js +1 -1
- package/stable/string/match-all.js +1 -0
- package/stable/string/virtual/match-all.js +1 -0
- package/stable/symbol/match-all.js +1 -0
- package/stage/0.js +0 -1
- package/stage/1.js +1 -1
- package/stage/2.js +1 -1
- package/stage/3.js +1 -1
- package/stage/4.js +2 -0
package/README.md
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
# core-js-pure
|
|
2
2
|
|
|
3
|
-
[](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://www.npmjs.com/package/core-js-pure) [](http://npm-stat.com/charts.html?package=core-js-pure&author=&from=2019-03-18) [](https://travis-ci.org/zloirock/core-js) [](https://david-dm.org/zloirock/core-js?type=dev)
|
|
3
|
+
[](#sponsors) [](#backers) [](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://www.npmjs.com/package/core-js-pure) [](http://npm-stat.com/charts.html?package=core-js-pure&author=&from=2019-03-18) [](https://travis-ci.org/zloirock/core-js) [](https://david-dm.org/zloirock/core-js?type=dev)
|
|
4
4
|
|
|
5
5
|
## As advertising: the author is looking for a good job -)
|
|
6
6
|
|
|
7
7
|
## [core-js@3, babel and a look into the future](https://github.com/zloirock/core-js/tree/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md)
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Raising funds
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
`core-js` isn't backed by a company, so the future of this project depends on you. Become a sponsor or a backer [**on Open Collective**](https://opencollective.com/core-js) or [**on Patreon**](https://www.patreon.com/zloirock) if you are interested in `core-js`.
|
|
12
|
+
|
|
13
|
+
---
|
|
12
14
|
|
|
13
15
|
<a href="https://opencollective.com/core-js/sponsor/0/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/0/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/1/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/1/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/2/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/2/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/3/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/3/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/4/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/4/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/5/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/5/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/6/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/6/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/7/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/7/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/8/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/8/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/9/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/9/avatar.svg"></a>
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
---
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
<a href="https://opencollective.com/core-js#backers" target="_blank"><img src="https://opencollective.com/core-js/backers.svg?width=890"></a>
|
|
18
20
|
|
|
19
21
|
---
|
|
20
22
|
|
package/es/index.js
CHANGED
|
@@ -5,6 +5,7 @@ require('../modules/es.symbol.has-instance');
|
|
|
5
5
|
require('../modules/es.symbol.is-concat-spreadable');
|
|
6
6
|
require('../modules/es.symbol.iterator');
|
|
7
7
|
require('../modules/es.symbol.match');
|
|
8
|
+
require('../modules/es.symbol.match-all');
|
|
8
9
|
require('../modules/es.symbol.replace');
|
|
9
10
|
require('../modules/es.symbol.search');
|
|
10
11
|
require('../modules/es.symbol.species');
|
|
@@ -75,6 +76,7 @@ require('../modules/es.string.code-point-at');
|
|
|
75
76
|
require('../modules/es.string.ends-with');
|
|
76
77
|
require('../modules/es.string.includes');
|
|
77
78
|
require('../modules/es.string.match');
|
|
79
|
+
require('../modules/es.string.match-all');
|
|
78
80
|
require('../modules/es.string.pad-end');
|
|
79
81
|
require('../modules/es.string.pad-start');
|
|
80
82
|
require('../modules/es.string.repeat');
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var matchAll = require('../string/virtual/match-all');
|
|
2
|
+
var StringPrototype = String.prototype;
|
|
3
|
+
|
|
4
|
+
module.exports = function (it) {
|
|
5
|
+
var own = it.matchAll;
|
|
6
|
+
return typeof it === 'string' || it === StringPrototype
|
|
7
|
+
|| (it instanceof String && own === StringPrototype.matchAll) ? matchAll : own;
|
|
8
|
+
};
|
package/es/string/index.js
CHANGED
|
@@ -4,6 +4,7 @@ require('../../modules/es.string.code-point-at');
|
|
|
4
4
|
require('../../modules/es.string.ends-with');
|
|
5
5
|
require('../../modules/es.string.includes');
|
|
6
6
|
require('../../modules/es.string.match');
|
|
7
|
+
require('../../modules/es.string.match-all');
|
|
7
8
|
require('../../modules/es.string.pad-end');
|
|
8
9
|
require('../../modules/es.string.pad-start');
|
|
9
10
|
require('../../modules/es.string.repeat');
|
|
@@ -2,6 +2,7 @@ require('../../../modules/es.string.code-point-at');
|
|
|
2
2
|
require('../../../modules/es.string.ends-with');
|
|
3
3
|
require('../../../modules/es.string.includes');
|
|
4
4
|
require('../../../modules/es.string.match');
|
|
5
|
+
require('../../../modules/es.string.match-all');
|
|
5
6
|
require('../../../modules/es.string.pad-end');
|
|
6
7
|
require('../../../modules/es.string.pad-start');
|
|
7
8
|
require('../../../modules/es.string.repeat');
|
package/es/symbol/index.js
CHANGED
|
@@ -7,6 +7,7 @@ require('../../modules/es.symbol.has-instance');
|
|
|
7
7
|
require('../../modules/es.symbol.is-concat-spreadable');
|
|
8
8
|
require('../../modules/es.symbol.iterator');
|
|
9
9
|
require('../../modules/es.symbol.match');
|
|
10
|
+
require('../../modules/es.symbol.match-all');
|
|
10
11
|
require('../../modules/es.symbol.replace');
|
|
11
12
|
require('../../modules/es.symbol.search');
|
|
12
13
|
require('../../modules/es.symbol.species');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports =
|
|
1
|
+
module.exports = require('../../es/array/flat-map');
|
package/features/array/flat.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports =
|
|
1
|
+
module.exports = require('../../es/array/flat');
|
package/features/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('
|
|
1
|
+
module.exports = require('..');
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var StringPrototype = String.prototype;
|
|
3
|
-
|
|
4
|
-
module.exports = function (it) {
|
|
5
|
-
var own = it.matchAll;
|
|
6
|
-
return typeof it === 'string' || it === StringPrototype
|
|
7
|
-
|| (it instanceof String && own === StringPrototype.matchAll) ? matchAll : own;
|
|
8
|
-
};
|
|
1
|
+
module.exports = require('../../es/instance/match-all');
|
package/features/object/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports =
|
|
1
|
+
module.exports = require('../../es/object');
|
package/features/string/index.js
CHANGED
package/features/symbol/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../es/symbol/match-all');
|
|
@@ -5,9 +5,9 @@ module.exports = function (iterator, fn, value, ENTRIES) {
|
|
|
5
5
|
try {
|
|
6
6
|
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
|
7
7
|
// 7.4.6 IteratorClose(iterator, completion)
|
|
8
|
-
} catch (
|
|
8
|
+
} catch (error) {
|
|
9
9
|
var returnMethod = iterator['return'];
|
|
10
10
|
if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
|
|
11
|
-
throw
|
|
11
|
+
throw error;
|
|
12
12
|
}
|
|
13
13
|
};
|
|
@@ -16,7 +16,7 @@ try {
|
|
|
16
16
|
};
|
|
17
17
|
// eslint-disable-next-line no-throw-literal
|
|
18
18
|
Array.from(iteratorWithReturn, function () { throw 2; });
|
|
19
|
-
} catch (
|
|
19
|
+
} catch (error) { /* empty */ }
|
|
20
20
|
|
|
21
21
|
module.exports = function (exec, SKIP_CLOSING) {
|
|
22
22
|
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
|
@@ -31,6 +31,6 @@ module.exports = function (exec, SKIP_CLOSING) {
|
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
exec(object);
|
|
34
|
-
} catch (
|
|
34
|
+
} catch (error) { /* empty */ }
|
|
35
35
|
return ITERATION_SUPPORT;
|
|
36
36
|
};
|
package/internals/classof.js
CHANGED
|
@@ -7,7 +7,7 @@ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Argu
|
|
|
7
7
|
var tryGet = function (it, key) {
|
|
8
8
|
try {
|
|
9
9
|
return it[key];
|
|
10
|
-
} catch (
|
|
10
|
+
} catch (error) { /* empty */ }
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
// getting tag from ES6+ `Object.prototype.toString`
|
package/internals/fails.js
CHANGED
|
@@ -18,7 +18,7 @@ var flattenIntoArray = function (target, original, source, sourceLen, start, dep
|
|
|
18
18
|
if (depth > 0 && isArray(element)) {
|
|
19
19
|
targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
|
|
20
20
|
} else {
|
|
21
|
-
if (targetIndex >=
|
|
21
|
+
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
22
22
|
target[targetIndex] = element;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var IS_PURE = require('../internals/is-pure');
|
|
3
|
+
var global = require('../internals/global');
|
|
4
|
+
var fails = require('../internals/fails');
|
|
5
|
+
|
|
2
6
|
// Forced replacement object prototype accessors methods
|
|
3
|
-
module.exports =
|
|
7
|
+
module.exports = IS_PURE || !fails(function () {
|
|
4
8
|
var key = Math.random();
|
|
5
9
|
// In FF throws only define methods
|
|
6
10
|
// eslint-disable-next-line no-undef, no-useless-call
|
|
7
11
|
__defineSetter__.call(null, key, function () { /* empty */ });
|
|
8
|
-
delete
|
|
12
|
+
delete global[key];
|
|
9
13
|
});
|
package/internals/global.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
var O = 'object';
|
|
2
|
+
var check = function (it) {
|
|
3
|
+
return it && it.Math == Math && it;
|
|
4
|
+
};
|
|
5
|
+
|
|
1
6
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
2
|
-
module.exports =
|
|
3
|
-
|
|
7
|
+
module.exports =
|
|
8
|
+
// eslint-disable-next-line no-undef
|
|
9
|
+
check(typeof globalThis == O && globalThis) ||
|
|
10
|
+
check(typeof window == O && window) ||
|
|
11
|
+
check(typeof self == O && self) ||
|
|
12
|
+
check(typeof global == O && global) ||
|
|
4
13
|
// eslint-disable-next-line no-new-func
|
|
5
|
-
|
|
14
|
+
Function('return this')();
|
package/internals/hide.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
var DESCRIPTORS = require('../internals/descriptors');
|
|
1
2
|
var definePropertyModule = require('../internals/object-define-property');
|
|
2
3
|
var createPropertyDescriptor = require('../internals/create-property-descriptor');
|
|
3
4
|
|
|
4
|
-
module.exports =
|
|
5
|
+
module.exports = DESCRIPTORS ? function (object, key, value) {
|
|
5
6
|
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
|
6
7
|
} : function (object, key, value) {
|
|
7
8
|
object[key] = value;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
var DESCRIPTORS = require('../internals/descriptors');
|
|
2
|
+
var fails = require('../internals/fails');
|
|
3
|
+
var createElement = require('../internals/document-create-element');
|
|
4
|
+
|
|
1
5
|
// Thank's IE8 for his funny defineProperty
|
|
2
|
-
module.exports = !
|
|
3
|
-
return Object.defineProperty(
|
|
6
|
+
module.exports = !DESCRIPTORS && !fails(function () {
|
|
7
|
+
return Object.defineProperty(createElement('div'), 'a', {
|
|
4
8
|
get: function () { return 7; }
|
|
5
9
|
}).a != 7;
|
|
6
10
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
var METADATA = require('../internals/uid')('meta');
|
|
2
2
|
var FREEZING = require('../internals/freezing');
|
|
3
|
+
var hiddenKeys = require('../internals/hidden-keys');
|
|
3
4
|
var isObject = require('../internals/is-object');
|
|
4
5
|
var has = require('../internals/has');
|
|
5
6
|
var defineProperty = require('../internals/object-define-property').f;
|
|
@@ -55,4 +56,4 @@ var meta = module.exports = {
|
|
|
55
56
|
onFreeze: onFreeze
|
|
56
57
|
};
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
hiddenKeys[METADATA] = true;
|
package/internals/microtask.js
CHANGED
|
@@ -23,10 +23,10 @@ if (!queueMicrotask) {
|
|
|
23
23
|
head = head.next;
|
|
24
24
|
try {
|
|
25
25
|
fn();
|
|
26
|
-
} catch (
|
|
26
|
+
} catch (error) {
|
|
27
27
|
if (head) notify();
|
|
28
28
|
else last = undefined;
|
|
29
|
-
throw
|
|
29
|
+
throw error;
|
|
30
30
|
}
|
|
31
31
|
} last = undefined;
|
|
32
32
|
if (parent) parent.enter();
|
|
@@ -38,7 +38,7 @@ if (!queueMicrotask) {
|
|
|
38
38
|
process.nextTick(flush);
|
|
39
39
|
};
|
|
40
40
|
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
|
|
41
|
-
} else if (MutationObserver && !/(
|
|
41
|
+
} else if (MutationObserver && !/(iphone|ipod|ipad).*applewebkit/i.test(userAgent)) {
|
|
42
42
|
toggle = true;
|
|
43
43
|
node = document.createTextNode('');
|
|
44
44
|
new MutationObserver(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var fails = require('../internals/fails');
|
|
2
|
+
|
|
3
|
+
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
4
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
3
5
|
// eslint-disable-next-line no-undef
|
|
4
|
-
String(Symbol());
|
|
6
|
+
return !String(Symbol());
|
|
5
7
|
});
|
package/internals/native-url.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
var IS_PURE = require('../internals/is-pure');
|
|
2
2
|
var ITERATOR = require('../internals/well-known-symbol')('iterator');
|
|
3
|
+
var fails = require('../internals/fails');
|
|
3
4
|
|
|
4
|
-
module.exports = !
|
|
5
|
+
module.exports = !fails(function () {
|
|
5
6
|
var url = new URL('b?e=1', 'http://a');
|
|
6
7
|
var searchParams = url.searchParams;
|
|
7
8
|
url.pathname = 'c%20d';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
// 19.1.2.1 Object.assign(target, source, ...)
|
|
3
|
+
var DESCRIPTORS = require('../internals/descriptors');
|
|
4
|
+
var fails = require('../internals/fails');
|
|
3
5
|
var objectKeys = require('../internals/object-keys');
|
|
4
6
|
var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');
|
|
5
7
|
var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');
|
|
@@ -8,7 +10,7 @@ var IndexedObject = require('../internals/indexed-object');
|
|
|
8
10
|
var nativeAssign = Object.assign;
|
|
9
11
|
|
|
10
12
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
11
|
-
module.exports = !nativeAssign ||
|
|
13
|
+
module.exports = !nativeAssign || fails(function () {
|
|
12
14
|
var A = {};
|
|
13
15
|
var B = {};
|
|
14
16
|
// eslint-disable-next-line no-undef
|
|
@@ -29,6 +31,9 @@ module.exports = !nativeAssign || require('../internals/fails')(function () {
|
|
|
29
31
|
var length = keys.length;
|
|
30
32
|
var j = 0;
|
|
31
33
|
var key;
|
|
32
|
-
while (length > j)
|
|
34
|
+
while (length > j) {
|
|
35
|
+
key = keys[j++];
|
|
36
|
+
if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
|
|
37
|
+
}
|
|
33
38
|
} return T;
|
|
34
39
|
} : nativeAssign;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
var anObject = require('../internals/an-object');
|
|
3
3
|
var defineProperties = require('../internals/object-define-properties');
|
|
4
4
|
var enumBugKeys = require('../internals/enum-bug-keys');
|
|
5
|
+
var hiddenKeys = require('../internals/hidden-keys');
|
|
5
6
|
var html = require('../internals/html');
|
|
6
7
|
var documentCreateElement = require('../internals/document-create-element');
|
|
7
8
|
var IE_PROTO = require('../internals/shared-key')('IE_PROTO');
|
|
@@ -42,4 +43,4 @@ module.exports = Object.create || function create(O, Properties) {
|
|
|
42
43
|
return Properties === undefined ? result : defineProperties(result, Properties);
|
|
43
44
|
};
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
hiddenKeys[IE_PROTO] = true;
|
|
@@ -10,7 +10,7 @@ exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, A
|
|
|
10
10
|
anObject(Attributes);
|
|
11
11
|
if (IE8_DOM_DEFINE) try {
|
|
12
12
|
return nativeDefineProperty(O, P, Attributes);
|
|
13
|
-
} catch (
|
|
13
|
+
} catch (error) { /* empty */ }
|
|
14
14
|
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
|
15
15
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
16
16
|
return O;
|
|
@@ -12,6 +12,6 @@ exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnProper
|
|
|
12
12
|
P = toPrimitive(P, true);
|
|
13
13
|
if (IE8_DOM_DEFINE) try {
|
|
14
14
|
return nativeGetOwnPropertyDescriptor(O, P);
|
|
15
|
-
} catch (
|
|
15
|
+
} catch (error) { /* empty */ }
|
|
16
16
|
if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
|
|
17
17
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable no-proto */
|
|
3
3
|
var validateSetPrototypeOfArguments = require('../internals/validate-set-prototype-of-arguments');
|
|
4
4
|
|
|
5
|
-
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
5
|
+
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
6
6
|
var correctSetter = false;
|
|
7
7
|
var test = {};
|
|
8
8
|
var setter;
|
|
@@ -10,7 +10,7 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { //
|
|
|
10
10
|
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
|
|
11
11
|
setter.call(test, []);
|
|
12
12
|
correctSetter = test instanceof Array;
|
|
13
|
-
} catch (
|
|
13
|
+
} catch (error) { /* empty */ }
|
|
14
14
|
return function setPrototypeOf(O, proto) {
|
|
15
15
|
validateSetPrototypeOfArguments(O, proto);
|
|
16
16
|
if (correctSetter) setter.call(O, proto);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
var DESCRIPTORS = require('../internals/descriptors');
|
|
1
2
|
var objectKeys = require('../internals/object-keys');
|
|
2
3
|
var toIndexedObject = require('../internals/to-indexed-object');
|
|
3
4
|
var propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;
|
|
@@ -11,7 +12,11 @@ module.exports = function (it, TO_ENTRIES) {
|
|
|
11
12
|
var i = 0;
|
|
12
13
|
var result = [];
|
|
13
14
|
var key;
|
|
14
|
-
while (length > i)
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
while (length > i) {
|
|
16
|
+
key = keys[i++];
|
|
17
|
+
if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {
|
|
18
|
+
result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return result;
|
|
17
22
|
};
|
package/internals/parse-int.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var nativeParseInt = require('../internals/global').parseInt;
|
|
2
2
|
var internalStringTrim = require('../internals/string-trim');
|
|
3
3
|
var whitespaces = require('../internals/whitespaces');
|
|
4
|
-
var hex = /^[
|
|
4
|
+
var hex = /^[+-]?0[Xx]/;
|
|
5
5
|
var FORCED = nativeParseInt(whitespaces + '08') !== 8 || nativeParseInt(whitespaces + '0x16') !== 22;
|
|
6
6
|
|
|
7
7
|
module.exports = FORCED ? function parseInt(str, radix) {
|
package/internals/perform.js
CHANGED
|
@@ -9,8 +9,8 @@ var damp = 700;
|
|
|
9
9
|
var initialBias = 72;
|
|
10
10
|
var initialN = 128; // 0x80
|
|
11
11
|
var delimiter = '-'; // '\x2D'
|
|
12
|
-
var regexNonASCII = /[^\0-\
|
|
13
|
-
var regexSeparators = /[
|
|
12
|
+
var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
|
|
13
|
+
var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
|
|
14
14
|
var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
|
|
15
15
|
var baseMinusTMin = base - tMin;
|
|
16
16
|
var floor = Math.floor;
|
|
@@ -160,7 +160,7 @@ var encode = function (input) {
|
|
|
160
160
|
|
|
161
161
|
module.exports = function (input) {
|
|
162
162
|
var encoded = [];
|
|
163
|
-
var labels = input.toLowerCase().replace(regexSeparators, '\
|
|
163
|
+
var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.');
|
|
164
164
|
var i, label;
|
|
165
165
|
for (i = 0; i < labels.length; i++) {
|
|
166
166
|
label = labels[i];
|
package/internals/set-global.js
CHANGED
package/internals/shared.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
var global = require('../internals/global');
|
|
2
2
|
var setGlobal = require('../internals/set-global');
|
|
3
|
+
var IS_PURE = require('../internals/is-pure');
|
|
3
4
|
var SHARED = '__core-js_shared__';
|
|
4
5
|
var store = global[SHARED] || setGlobal(SHARED, {});
|
|
5
6
|
|
|
6
7
|
(module.exports = function (key, value) {
|
|
7
8
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
8
9
|
})('versions', []).push({
|
|
9
|
-
version: '3.
|
|
10
|
-
mode:
|
|
10
|
+
version: '3.1.2',
|
|
11
|
+
mode: IS_PURE ? 'pure' : 'global',
|
|
11
12
|
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
|
12
13
|
});
|
|
@@ -4,7 +4,7 @@ var fails = require('../internals/fails');
|
|
|
4
4
|
module.exports = function (METHOD_NAME, argument) {
|
|
5
5
|
var method = [][METHOD_NAME];
|
|
6
6
|
return !method || !fails(function () {
|
|
7
|
-
// eslint-disable-next-line no-useless-call
|
|
8
|
-
method.call(null, argument || function () { throw
|
|
7
|
+
// eslint-disable-next-line no-useless-call,no-throw-literal
|
|
8
|
+
method.call(null, argument || function () { throw 1; }, 1);
|
|
9
9
|
});
|
|
10
10
|
};
|
package/internals/string-at.js
CHANGED
|
@@ -9,8 +9,8 @@ module.exports = function (that, pos, CONVERT_TO_STRING) {
|
|
|
9
9
|
var first, second;
|
|
10
10
|
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
11
11
|
first = S.charCodeAt(position);
|
|
12
|
-
return first <
|
|
13
|
-
|| (second = S.charCodeAt(position + 1)) <
|
|
12
|
+
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
13
|
+
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
|
14
14
|
? CONVERT_TO_STRING ? S.charAt(position) : first
|
|
15
|
-
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first -
|
|
15
|
+
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
16
16
|
};
|