core-js 3.25.4 → 3.25.5
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/internals/classof-raw.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
1
|
+
var uncurryThisRaw = require('../internals/function-uncurry-this-raw');
|
|
2
2
|
|
|
3
|
-
var toString =
|
|
4
|
-
var stringSlice =
|
|
3
|
+
var toString = uncurryThisRaw({}.toString);
|
|
4
|
+
var stringSlice = uncurryThisRaw(''.slice);
|
|
5
5
|
|
|
6
6
|
module.exports = function (it) {
|
|
7
7
|
return stringSlice(toString(it), 8, -1);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var NATIVE_BIND = require('../internals/function-bind-native');
|
|
2
|
+
|
|
3
|
+
var FunctionPrototype = Function.prototype;
|
|
4
|
+
var call = FunctionPrototype.call;
|
|
5
|
+
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
|
|
6
|
+
|
|
7
|
+
module.exports = function (fn) {
|
|
8
|
+
return NATIVE_BIND ? uncurryThisWithBind(fn) : function () {
|
|
9
|
+
return call.apply(fn, arguments);
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
var $Function = Function;
|
|
4
|
-
var FunctionPrototype = $Function.prototype;
|
|
5
|
-
var bind = FunctionPrototype.bind;
|
|
6
|
-
var call = FunctionPrototype.call;
|
|
7
|
-
var uncurryThis = NATIVE_BIND && bind.bind(call, call);
|
|
1
|
+
var classofRaw = require('../internals/classof-raw');
|
|
2
|
+
var uncurryThisRaw = require('../internals/function-uncurry-this-raw');
|
|
8
3
|
|
|
9
4
|
module.exports = function (fn) {
|
|
10
5
|
// Nashorn bug:
|
|
11
6
|
// https://github.com/zloirock/core-js/issues/1128
|
|
12
7
|
// https://github.com/zloirock/core-js/issues/1130
|
|
13
|
-
|
|
14
|
-
return call.apply(fn, arguments);
|
|
15
|
-
} : undefined;
|
|
8
|
+
if (classofRaw(fn) === 'Function') return uncurryThisRaw(fn);
|
|
16
9
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
var NATIVE_WEAK_MAP = require('../internals/weak-map-basic-detection');
|
|
2
2
|
var global = require('../internals/global');
|
|
3
|
-
var uncurryThis = require('../internals/function-uncurry-this');
|
|
4
3
|
var isObject = require('../internals/is-object');
|
|
5
4
|
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
|
|
6
5
|
var hasOwn = require('../internals/has-own-property');
|
|
@@ -28,20 +27,22 @@ var getterFor = function (TYPE) {
|
|
|
28
27
|
|
|
29
28
|
if (NATIVE_WEAK_MAP || shared.state) {
|
|
30
29
|
var store = shared.state || (shared.state = new WeakMap());
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
31
|
+
store.get = store.get;
|
|
32
|
+
store.has = store.has;
|
|
33
|
+
store.set = store.set;
|
|
34
|
+
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
34
35
|
set = function (it, metadata) {
|
|
35
|
-
if (
|
|
36
|
+
if (store.has(it)) throw TypeError(OBJECT_ALREADY_INITIALIZED);
|
|
36
37
|
metadata.facade = it;
|
|
37
|
-
|
|
38
|
+
store.set(it, metadata);
|
|
38
39
|
return metadata;
|
|
39
40
|
};
|
|
40
41
|
get = function (it) {
|
|
41
|
-
return
|
|
42
|
+
return store.get(it) || {};
|
|
42
43
|
};
|
|
43
44
|
has = function (it) {
|
|
44
|
-
return
|
|
45
|
+
return store.has(it);
|
|
45
46
|
};
|
|
46
47
|
} else {
|
|
47
48
|
var STATE = sharedKey('state');
|
package/internals/shared.js
CHANGED
|
@@ -4,9 +4,9 @@ var store = require('../internals/shared-store');
|
|
|
4
4
|
(module.exports = function (key, value) {
|
|
5
5
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
6
6
|
})('versions', []).push({
|
|
7
|
-
version: '3.25.
|
|
7
|
+
version: '3.25.5',
|
|
8
8
|
mode: IS_PURE ? 'pure' : 'global',
|
|
9
9
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
10
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.25.
|
|
10
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE',
|
|
11
11
|
source: 'https://github.com/zloirock/core-js'
|
|
12
12
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var $ = require('../internals/export');
|
|
2
|
-
var
|
|
2
|
+
var uncurryThisRaw = require('../internals/function-uncurry-this-raw');
|
|
3
3
|
var aCallable = require('../internals/a-callable');
|
|
4
4
|
|
|
5
5
|
// `Function.prototype.unThis` method
|
|
6
6
|
// https://github.com/js-choi/proposal-function-un-this
|
|
7
7
|
$({ target: 'Function', proto: true, forced: true }, {
|
|
8
8
|
unThis: function unThis() {
|
|
9
|
-
return
|
|
9
|
+
return uncurryThisRaw(aCallable(this));
|
|
10
10
|
}
|
|
11
11
|
});
|