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

core-js

Package Overview
Dependencies
Maintainers
1
Versions
276
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

core-js - npm Package Compare versions

Comparing version 3.19.2 to 3.19.3

4

internals/async-from-sync-iterator.js

@@ -13,4 +13,5 @@ 'use strict';

var ASYNC_FROM_SYNC_ITERATOR = 'AsyncFromSyncIterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.get;
var getInternalState = InternalStateModule.getterFor(ASYNC_FROM_SYNC_ITERATOR);

@@ -26,2 +27,3 @@ var asyncFromSyncIteratorContinuation = function (result, resolve, reject) {

setInternalState(this, {
type: ASYNC_FROM_SYNC_ITERATOR,
iterator: anObject(iterator),

@@ -28,0 +30,0 @@ next: iterator.next

@@ -16,4 +16,5 @@ 'use strict';

var ASYNC_ITERATOR_PROXY = 'AsyncIteratorProxy';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.get;
var getInternalState = InternalStateModule.getterFor(ASYNC_ITERATOR_PROXY);

@@ -24,2 +25,3 @@ var TO_STRING_TAG = wellKnownSymbol('toStringTag');

var AsyncIteratorProxy = function AsyncIterator(state) {
state.type = ASYNC_ITERATOR_PROXY;
state.next = aCallable(state.iterator.next);

@@ -26,0 +28,0 @@ state.done = false;

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

module.exports = function (IteratorConstructor, NAME, next) {
module.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
var TO_STRING_TAG = NAME + ' Iterator';
IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);

@@ -15,0 +15,0 @@ Iterators[TO_STRING_TAG] = returnThis;

@@ -13,4 +13,5 @@ 'use strict';

var ITERATOR_PROXY = 'IteratorProxy';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.get;
var getInternalState = InternalStateModule.getterFor(ITERATOR_PROXY);

@@ -21,2 +22,3 @@ var TO_STRING_TAG = wellKnownSymbol('toStringTag');

var IteratorProxy = function Iterator(state) {
state.type = ITERATOR_PROXY;
state.next = aCallable(state.iterator.next);

@@ -23,0 +25,0 @@ state.done = false;

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

})('versions', []).push({
version: '3.19.2',
version: '3.19.3',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
});

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

var getInternalState = InternalStateModule.get;
var getInternalState = InternalStateModule.getterFor(PROMISE);
var setInternalState = InternalStateModule.set;

@@ -40,0 +40,0 @@ var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);

@@ -24,38 +24,47 @@ 'use strict';

var OBSERVABLE = wellKnownSymbol('observable');
var getInternalState = InternalStateModule.get;
var $$OBSERVABLE = wellKnownSymbol('observable');
var OBSERVABLE = 'Observable';
var SUBSCRIPTION = 'Subscription';
var SUBSCRIPTION_OBSERVER = 'SubscriptionObserver';
var getterFor = InternalStateModule.getterFor;
var setInternalState = InternalStateModule.set;
var getObservableInternalState = getterFor(OBSERVABLE);
var getSubscriptionInternalState = getterFor(SUBSCRIPTION);
var getSubscriptionObserverInternalState = getterFor(SUBSCRIPTION_OBSERVER);
var Array = global.Array;
var cleanupSubscription = function (subscriptionState) {
var cleanup = subscriptionState.cleanup;
if (cleanup) {
subscriptionState.cleanup = undefined;
try {
cleanup();
} catch (error) {
hostReportErrors(error);
var SubscriptionState = function (observer) {
this.observer = anObject(observer);
this.cleanup = undefined;
this.subscriptionObserver = undefined;
};
SubscriptionState.prototype = {
type: SUBSCRIPTION,
clean: function () {
var cleanup = this.cleanup;
if (cleanup) {
this.cleanup = undefined;
try {
cleanup();
} catch (error) {
hostReportErrors(error);
}
}
},
close: function () {
if (!DESCRIPTORS) {
var subscription = this.facade;
var subscriptionObserver = this.subscriptionObserver;
subscription.closed = true;
if (subscriptionObserver) subscriptionObserver.closed = true;
} this.observer = undefined;
},
isClosed: function () {
return this.observer === undefined;
}
};
var subscriptionClosed = function (subscriptionState) {
return subscriptionState.observer === undefined;
};
var close = function (subscriptionState) {
var subscription = subscriptionState.facade;
if (!DESCRIPTORS) {
subscription.closed = true;
var subscriptionObserver = subscriptionState.subscriptionObserver;
if (subscriptionObserver) subscriptionObserver.closed = true;
} subscriptionState.observer = undefined;
};
var Subscription = function (observer, subscriber) {
var subscriptionState = setInternalState(this, {
cleanup: undefined,
observer: anObject(observer),
subscriptionObserver: undefined
});
var subscriptionState = setInternalState(this, new SubscriptionState(observer));
var start;

@@ -68,4 +77,4 @@ if (!DESCRIPTORS) this.closed = false;

}
if (subscriptionClosed(subscriptionState)) return;
var subscriptionObserver = subscriptionState.subscriptionObserver = new SubscriptionObserver(this);
if (subscriptionState.isClosed()) return;
var subscriptionObserver = subscriptionState.subscriptionObserver = new SubscriptionObserver(subscriptionState);
try {

@@ -80,3 +89,3 @@ var cleanup = subscriber(subscriptionObserver);

return;
} if (subscriptionClosed(subscriptionState)) cleanupSubscription(subscriptionState);
} if (subscriptionState.isClosed()) subscriptionState.clean();
};

@@ -86,6 +95,6 @@

unsubscribe: function unsubscribe() {
var subscriptionState = getInternalState(this);
if (!subscriptionClosed(subscriptionState)) {
close(subscriptionState);
cleanupSubscription(subscriptionState);
var subscriptionState = getSubscriptionInternalState(this);
if (!subscriptionState.isClosed()) {
subscriptionState.close();
subscriptionState.clean();
}

@@ -98,8 +107,11 @@ }

get: function () {
return subscriptionClosed(getInternalState(this));
return getSubscriptionInternalState(this).isClosed();
}
});
var SubscriptionObserver = function (subscription) {
setInternalState(this, { subscription: subscription });
var SubscriptionObserver = function (subscriptionState) {
setInternalState(this, {
type: SUBSCRIPTION_OBSERVER,
subscriptionState: subscriptionState
});
if (!DESCRIPTORS) this.closed = false;

@@ -110,4 +122,4 @@ };

next: function next(value) {
var subscriptionState = getInternalState(getInternalState(this).subscription);
if (!subscriptionClosed(subscriptionState)) {
var subscriptionState = getSubscriptionObserverInternalState(this).subscriptionState;
if (!subscriptionState.isClosed()) {
var observer = subscriptionState.observer;

@@ -123,6 +135,6 @@ try {

error: function error(value) {
var subscriptionState = getInternalState(getInternalState(this).subscription);
if (!subscriptionClosed(subscriptionState)) {
var subscriptionState = getSubscriptionObserverInternalState(this).subscriptionState;
if (!subscriptionState.isClosed()) {
var observer = subscriptionState.observer;
close(subscriptionState);
subscriptionState.close();
try {

@@ -134,10 +146,10 @@ var errorMethod = getMethod(observer, 'error');

hostReportErrors(err);
} cleanupSubscription(subscriptionState);
} subscriptionState.clean();
}
},
complete: function complete() {
var subscriptionState = getInternalState(getInternalState(this).subscription);
if (!subscriptionClosed(subscriptionState)) {
var subscriptionState = getSubscriptionObserverInternalState(this).subscriptionState;
if (!subscriptionState.isClosed()) {
var observer = subscriptionState.observer;
close(subscriptionState);
subscriptionState.close();
try {

@@ -148,3 +160,3 @@ var completeMethod = getMethod(observer, 'complete');

hostReportErrors(error);
} cleanupSubscription(subscriptionState);
} subscriptionState.clean();
}

@@ -157,3 +169,3 @@ }

get: function () {
return subscriptionClosed(getInternalState(getInternalState(this).subscription));
return getSubscriptionObserverInternalState(this).subscriptionState.isClosed();
}

@@ -164,3 +176,6 @@ });

anInstance(this, ObservablePrototype);
setInternalState(this, { subscriber: aCallable(subscriber) });
setInternalState(this, {
type: OBSERVABLE,
subscriber: aCallable(subscriber)
});
};

@@ -177,3 +192,3 @@

complete: length > 2 ? arguments[2] : undefined
} : isObject(observer) ? observer : {}, getInternalState(this).subscriber);
} : isObject(observer) ? observer : {}, getObservableInternalState(this).subscriber);
}

@@ -185,3 +200,3 @@ });

var C = isConstructor(this) ? this : $Observable;
var observableMethod = getMethod(anObject(x), OBSERVABLE);
var observableMethod = getMethod(anObject(x), $$OBSERVABLE);
if (observableMethod) {

@@ -217,3 +232,3 @@ var observable = anObject(call(observableMethod, x));

redefine(ObservablePrototype, OBSERVABLE, function () { return this; });
redefine(ObservablePrototype, $$OBSERVABLE, function () { return this; });

@@ -224,2 +239,2 @@ $({ global: true }, {

setSpecies('Observable');
setSpecies(OBSERVABLE);

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

} return step;
});
}, true);

@@ -123,0 +123,0 @@ var URLSearchParamsState = function (init) {

{
"name": "core-js",
"description": "Standard library",
"version": "3.19.2",
"version": "3.19.3",
"repository": {

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

},
"gitHead": "e49b7f34f7b3a10cc88e1210431508c7a58e069b"
"gitHead": "7dae270c1acf496ba701acfc6272453d7c06aa53"
}
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