core-js-pure 3.26.0 → 3.26.1
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 +3 -3
- package/internals/export.js +1 -1
- package/internals/function-bind-context.js +1 -1
- package/internals/function-uncurry-this-clause.js +9 -0
- package/internals/function-uncurry-this.js +9 -7
- package/internals/shared.js +2 -2
- package/modules/es.array.index-of.js +1 -1
- package/modules/es.string.ends-with.js +1 -1
- package/modules/es.string.match-all.js +1 -1
- package/modules/es.string.starts-with.js +1 -1
- package/modules/esnext.array.from-async.js +1 -1
- package/modules/esnext.function.un-this.js +2 -2
- package/package.json +1 -1
- package/internals/function-uncurry-this-raw.js +0 -11
package/internals/classof-raw.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
1
|
+
var uncurryThis = require('../internals/function-uncurry-this');
|
|
2
2
|
|
|
3
|
-
var toString =
|
|
4
|
-
var stringSlice =
|
|
3
|
+
var toString = uncurryThis({}.toString);
|
|
4
|
+
var stringSlice = uncurryThis(''.slice);
|
|
5
5
|
|
|
6
6
|
module.exports = function (it) {
|
|
7
7
|
return stringSlice(toString(it), 8, -1);
|
package/internals/export.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var global = require('../internals/global');
|
|
3
3
|
var apply = require('../internals/function-apply');
|
|
4
|
-
var uncurryThis = require('../internals/function-uncurry-this');
|
|
4
|
+
var uncurryThis = require('../internals/function-uncurry-this-clause');
|
|
5
5
|
var isCallable = require('../internals/is-callable');
|
|
6
6
|
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
|
|
7
7
|
var isForced = require('../internals/is-forced');
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var classofRaw = require('../internals/classof-raw');
|
|
2
|
+
var uncurryThis = require('../internals/function-uncurry-this');
|
|
3
|
+
|
|
4
|
+
module.exports = function (fn) {
|
|
5
|
+
// Nashorn bug:
|
|
6
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
7
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
8
|
+
if (classofRaw(fn) === 'Function') return uncurryThis(fn);
|
|
9
|
+
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var uncurryThisRaw = require('../internals/function-uncurry-this-raw');
|
|
1
|
+
var NATIVE_BIND = require('../internals/function-bind-native');
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
var FunctionPrototype = Function.prototype;
|
|
4
|
+
var call = FunctionPrototype.call;
|
|
5
|
+
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
|
|
6
|
+
|
|
7
|
+
module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
|
8
|
+
return function () {
|
|
9
|
+
return call.apply(fn, arguments);
|
|
10
|
+
};
|
|
9
11
|
};
|
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.26.
|
|
7
|
+
version: '3.26.1',
|
|
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.26.
|
|
10
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
|
|
11
11
|
source: 'https://github.com/zloirock/core-js'
|
|
12
12
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/* eslint-disable es/no-array-prototype-indexof -- required for testing */
|
|
3
3
|
var $ = require('../internals/export');
|
|
4
|
-
var uncurryThis = require('../internals/function-uncurry-this');
|
|
4
|
+
var uncurryThis = require('../internals/function-uncurry-this-clause');
|
|
5
5
|
var $indexOf = require('../internals/array-includes').indexOf;
|
|
6
6
|
var arrayMethodIsStrict = require('../internals/array-method-is-strict');
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var $ = require('../internals/export');
|
|
3
|
-
var uncurryThis = require('../internals/function-uncurry-this');
|
|
3
|
+
var uncurryThis = require('../internals/function-uncurry-this-clause');
|
|
4
4
|
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
|
|
5
5
|
var toLength = require('../internals/to-length');
|
|
6
6
|
var toString = require('../internals/to-string');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable es/no-string-prototype-matchall -- safe */
|
|
3
3
|
var $ = require('../internals/export');
|
|
4
4
|
var call = require('../internals/function-call');
|
|
5
|
-
var uncurryThis = require('../internals/function-uncurry-this');
|
|
5
|
+
var uncurryThis = require('../internals/function-uncurry-this-clause');
|
|
6
6
|
var createIteratorConstructor = require('../internals/iterator-create-constructor');
|
|
7
7
|
var createIterResultObject = require('../internals/create-iter-result-object');
|
|
8
8
|
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var $ = require('../internals/export');
|
|
3
|
-
var uncurryThis = require('../internals/function-uncurry-this');
|
|
3
|
+
var uncurryThis = require('../internals/function-uncurry-this-clause');
|
|
4
4
|
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
|
|
5
5
|
var toLength = require('../internals/to-length');
|
|
6
6
|
var toString = require('../internals/to-string');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var $ = require('../internals/export');
|
|
2
|
-
var
|
|
2
|
+
var uncurryThis = require('../internals/function-uncurry-this');
|
|
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 uncurryThis(aCallable(this));
|
|
10
10
|
}
|
|
11
11
|
});
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
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 = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
|
8
|
-
return function () {
|
|
9
|
-
return call.apply(fn, arguments);
|
|
10
|
-
};
|
|
11
|
-
};
|