Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

core-js-pure

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

core-js-pure - npm Package Compare versions

Comparing version 3.20.1 to 3.20.2

internals/v8-prototype-define-bug.js

4

internals/function-uncurry-this.js
var FunctionPrototype = Function.prototype;
var bind = FunctionPrototype.bind;
var call = FunctionPrototype.call;
var callBind = bind && bind.bind(call);
var uncurryThis = bind && bind.bind(call, call);
module.exports = bind ? function (fn) {
return fn && callBind(call, fn);
return fn && uncurryThis(fn);
} : function (fn) {

@@ -9,0 +9,0 @@ return fn && function () {

@@ -8,2 +8,3 @@ var fails = require('../internals/fails');

module.exports = !fails(function () {
// eslint-disable-next-line unicorn/relative-url-style -- required for testing
var url = new URL('b?a=1&b=2&c=3', 'http://a');

@@ -10,0 +11,0 @@ var searchParams = url.searchParams;

@@ -6,3 +6,3 @@ 'use strict';

var isObject = require('../internals/is-object');
var defineProperties = require('../internals/object-define-properties');
var defineProperties = require('../internals/object-define-properties').f;
var DESCRIPTORS = require('../internals/descriptors');

@@ -9,0 +9,0 @@

/* global ActiveXObject -- old IE, WSH */
var anObject = require('../internals/an-object');
var defineProperties = require('../internals/object-define-properties');
var definePropertiesModule = require('../internals/object-define-properties');
var enumBugKeys = require('../internals/enum-bug-keys');

@@ -81,3 +81,3 @@ var hiddenKeys = require('../internals/hidden-keys');

} else result = NullProtoObject();
return Properties === undefined ? result : defineProperties(result, Properties);
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
};
var DESCRIPTORS = require('../internals/descriptors');
var V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');
var definePropertyModule = require('../internals/object-define-property');

@@ -10,3 +11,3 @@ var anObject = require('../internals/an-object');

// eslint-disable-next-line es/no-object-defineproperties -- safe
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);

@@ -13,0 +14,0 @@ var props = toIndexedObject(Properties);

var global = require('../internals/global');
var DESCRIPTORS = require('../internals/descriptors');
var IE8_DOM_DEFINE = require('../internals/ie8-dom-define');
var V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');
var anObject = require('../internals/an-object');

@@ -10,9 +11,29 @@ var toPropertyKey = require('../internals/to-property-key');

var $defineProperty = Object.defineProperty;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var ENUMERABLE = 'enumerable';
var CONFIGURABLE = 'configurable';
var WRITABLE = 'writable';
// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {
exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
anObject(O);
P = toPropertyKey(P);
anObject(Attributes);
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
var current = $getOwnPropertyDescriptor(O, P);
if (current && current[WRITABLE]) {
O[P] = Attributes.value;
Attributes = {
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
writable: false
};
}
} return $defineProperty(O, P, Attributes);
} : $defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPropertyKey(P);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {

@@ -19,0 +40,0 @@ return $defineProperty(O, P, Attributes);

@@ -7,5 +7,5 @@ var IS_PURE = require('../internals/is-pure');

})('versions', []).push({
version: '3.20.1',
version: '3.20.2',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
copyright: '© 2022 Denis Pushkarev (zloirock.ru)'
});
var $ = require('../internals/export');
var DESCRIPTORS = require('../internals/descriptors');
var defineProperties = require('../internals/object-define-properties');
var defineProperties = require('../internals/object-define-properties').f;
// `Object.defineProperties` method
// https://tc39.es/ecma262/#sec-object.defineproperties
$({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, {
// eslint-disable-next-line es/no-object-defineproperties -- safe
$({ target: 'Object', stat: true, forced: Object.defineProperties !== defineProperties, sham: !DESCRIPTORS }, {
defineProperties: defineProperties
});
var $ = require('../internals/export');
var DESCRIPTORS = require('../internals/descriptors');
var objectDefinePropertyModule = require('../internals/object-define-property');
var defineProperty = require('../internals/object-define-property').f;
// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
$({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, {
defineProperty: objectDefinePropertyModule.f
// eslint-disable-next-line es/no-object-defineproperty -- safe
$({ target: 'Object', stat: true, forced: Object.defineProperty !== defineProperty, sham: !DESCRIPTORS }, {
defineProperty: defineProperty
});

@@ -14,2 +14,3 @@ 'use strict';

var NON_GENERIC = !!NativePromise && fails(function () {
// eslint-disable-next-line unicorn/no-thenable -- required for testing
NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });

@@ -16,0 +17,0 @@ });

@@ -268,2 +268,3 @@ 'use strict';

// https://tc39.es/ecma262/#sec-promise.prototype.then
// eslint-disable-next-line unicorn/no-thenable -- safe
then: function then(onFulfilled, onRejected) {

@@ -270,0 +271,0 @@ var state = getInternalPromiseState(this);

@@ -31,2 +31,3 @@ 'use strict';

var definePropertyModule = require('../internals/object-define-property');
var definePropertiesModule = require('../internals/object-define-properties');
var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');

@@ -198,2 +199,3 @@ var arraySlice = require('../internals/array-slice');

definePropertyModule.f = $defineProperty;
definePropertiesModule.f = $defineProperties;
getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;

@@ -200,0 +202,0 @@ getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;

@@ -9,3 +9,3 @@ 'use strict';

var defineProperty = require('../internals/object-define-property').f;
var defineProperties = require('../internals/object-define-properties');
var defineProperties = require('../internals/object-define-properties').f;
var redefine = require('../internals/redefine');

@@ -12,0 +12,0 @@ var hasOwn = require('../internals/has-own-property');

@@ -10,3 +10,3 @@ 'use strict';

var uncurryThis = require('../internals/function-uncurry-this');
var defineProperties = require('../internals/object-define-properties');
var defineProperties = require('../internals/object-define-properties').f;
var redefine = require('../internals/redefine');

@@ -13,0 +13,0 @@ var anInstance = require('../internals/an-instance');

{
"name": "core-js-pure",
"description": "Standard library",
"version": "3.20.1",
"version": "3.20.2",
"repository": {

@@ -57,3 +57,3 @@ "type": "git",

},
"gitHead": "8f22e986132c93458b778e656fb501dd6c86764e"
"gitHead": "da1bf15799afc93d4985392a5d1ce5468db1bdd8"
}

@@ -41,3 +41,3 @@ var fs = require('fs');

if (DELTA >= 0 && DELTA < MINUTE * 3) {
banners = JSON.parse(fs.readFileSync(file, 'utf8'));
banners = JSON.parse(fs.readFileSync(file));
if (banners.indexOf(BANNER) !== -1) return false;

@@ -44,0 +44,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc