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

live-set

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

live-set - npm Package Compare versions

Comparing version 0.3.8 to 0.3.9

19

flatMap.js

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

function childSetSubscribe(childSet, value) {
function childSetSubscribe(childSet) {
childSet.subscribe({

@@ -72,3 +72,2 @@ start: function start(sub) {

childSetSubs.delete(childSet);
childSets.delete(value);
if (mainSubCompleted && childSetSubs.size === 0) {

@@ -89,3 +88,3 @@ controller.end();

childSets.set(value, childSet);
childSetSubscribe(childSet, value);
childSetSubscribe(childSet);
});

@@ -100,14 +99,16 @@ hasSubscribedToChildren = true;

childSets.set(change.value, childSet);
childSetSubscribe(childSet, change.value);
childSetSubscribe(childSet);
} else if (change.type === 'remove') {
var _childSet = childSets.get(change.value);
if (!_childSet) throw new Error('removed value not in liveset');
var childSetSub = childSetSubs.get(_childSet);
if (!childSetSub) throw Error('childSet was not subscribed to');
_childSet.values().forEach(function (value) {
controller.remove(value);
});
childSetSub.unsubscribe();
childSetSubs.delete(_childSet);
childSets.delete(change.value);
var childSetSub = childSetSubs.get(_childSet);
if (childSetSub) {
// We won't have the subscription if the childSet ended already
childSetSub.unsubscribe();
childSetSubs.delete(_childSet);
}
}

@@ -157,2 +158,2 @@ });

module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9mbGF0TWFwLmpzIl0sIm5hbWVzIjpbImZsYXRNYXAiLCJsaXZlU2V0IiwiY2IiLCJpc1JlYWRpbmciLCJyZWFkIiwiRXJyb3IiLCJzIiwidmFsdWVzIiwiZm9yRWFjaCIsImNoaWxkU2V0IiwidmFsdWUiLCJhZGQiLCJsaXN0ZW4iLCJzZXRWYWx1ZXMiLCJjb250cm9sbGVyIiwibWFpblN1YkNv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9PT0gJ2FkZCcpIHtcbiAgICAgICAgICAgICAgICBjb250cm9sbGVyLmFkZChjaGFuZ2UudmFsdWUpO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoYW5nZS50eXBlID09PSAncmVtb3ZlJykge1xuICAgICAgICAgICAgICAgIGNvbnRyb2xsZXIucmVtb3ZlKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgZXJyb3IoZXJyKSB7XG4gICAgICAgICAgICBjb250cm9sbGVyLmVycm9yKGVycik7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBjb21wbGV0ZSgpIHtcbiAgICAgICAgICAgIGNoaWxkU2V0U3Vicy5kZWxldGUoY2hpbGRTZXQpO1xuICAgICAgICAgICAgY2hpbGRTZXRzLmRlbGV0ZSh2YWx1ZSk7XG4gICAgICAgICAgICBpZiAobWFpblN1YkNvbXBsZXRlZCAmJiBjaGlsZFNldFN1YnMuc2l6ZSA9PT0gMCkge1xuICAgICAgICAgICAgICBjb250cm9sbGVyLmVuZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHNldFZhbHVlcyhuZXcgU2V0KCkpO1xuICAgICAgY29uc3QgY2hpbGRTZXRzOiBNYXA8VCwgTGl2ZVNldDxVPj4gPSBuZXcgTWFwKCk7XG5cbiAgICAgIGNvbnN0IG1haW5TdWIgPSBsaXZlU2V0LnN1YnNjcmliZSh7XG4gICAgICAgIHN0YXJ0KCkge1xuICAgICAgICAgIGxpdmVTZXQudmFsdWVzKCkuZm9yRWFjaCh2YWx1ZSA9PiB7XG4gICAgICAgICAgICBjb25zdCBjaGlsZFNldCA9IGNiKHZhbHVlKTtcbiAgICAgICAgICAgIGNoaWxkU2V0cy5zZXQodmFsdWUsIGNoaWxkU2V0KTtcbiAgICAgICAgICAgIGNoaWxkU2V0U3Vic2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ICAgfSk7XG4gICAgICAgICAgICAgIGNoaWxkU2V0U3ViLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgICAgICAgIGNoaWxkU2V0U3Vicy5kZWxldGUoY2hpbGRTZXQpO1xuICAgICAgICAgICAgICBjaGlsZFNldHMuZGVsZXRlKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIGVycm9yKGVycikge1xuICAgICAgICAgIGNvbnRyb2xsZXIuZXJyb3IoZXJyKTtcbiAgICAgICAgfSxcbiAgICAgICAgY29tcGxldGUoKSB7XG4gICAgICAgICAgbWFpblN1YkNvbXBsZXRlZCA9IHRydWU7XG4gICAgICAgICAgaWYgKGhhc1N1YnNjcmliZWRUb0NoaWxkcmVuICYmIGNoaWxkU2V0U3Vicy5zaXplID09PSAwKSB7XG4gICAgICAgICAgICBjb250cm9sbGVyLmVuZCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIGxldCBpc1B1bGxpbmdDaGFuZ2VzID0gZmFsc2U7XG4gICAgICByZXR1cm4ge1xuICAgICAgICB1bnN1YnNjcmliZSgpIHtcbiAgICAgICAgICBtYWluU3ViLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgICAgY2hpbGRTZXRTdWJzLmZvckVhY2goc3ViID0+IHtcbiAgICAgICAgICAgIHN1Yi51bnN1YnNjcmliZSgpO1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIGNoaWxkU2V0cy5jbGVhcigpO1xuICAgICAgICAgIGNoaWxkU2V0U3Vicy5jbGVhcigpO1xuICAgICAgICB9LFxuICAgICAgICBwdWxsQ2hhbmdlcygpIHtcbiAgICAgICAgICBpZiAoaXNQdWxsaW5nQ2hhbmdlcykgcmV0dXJuO1xuICAgICAgICAgIGlzUHVsbGluZ0NoYW5nZXMgPSB0cnVlO1xuXG4gICAgICAgICAgZG8ge1xuICAgICAgICAgICAgbmV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Y2hpbGRTZXQ6IExpdmVTZXQ8VT4pIHtcbiAgICAgICAgY2hpbGRTZXQuc3Vic2NyaWJlKHtcbiAgICAgICAgICBzdGFydChzdWIpIHtcbiAgICAgICAgICAgIGNoaWxkU2V0U3Vicy5zZXQoY2hpbGRTZXQsIHN1Yik7XG4gICAgICAgICAgICBjaGlsZFNldC52YWx1ZXMoKS5mb3JFYWNoKHZhbHVlID0+IHtcbiAgICAgICAgICAgICAgY29udHJvbGxlci5hZGQodmFsdWUpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBuZXh0KGNoYW5nZXMpIHtcbiAgICAgICAgICAgIG5leHRIYXNGaXJlZCA9IHRydWU7XG4gICAgICAgICAgICBjaGFuZ2VzLmZvckVhY2goY2hhbmdlID0+IHtcbiAgICAgICAgICAgICAgaWYgKGNoYW5nZS50eXBlID09PSAnYWRkJykge1xuICAgICAgICAgICAgICAgIGNvbnRyb2xsZXIuYWRkKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hhbmdlLnR5cGUgPT09ICdyZW1vdmUnKSB7XG4gICAgICAgICAgICAgICAgY29udHJvbGxlci5yZW1vdmUoY2hhbmdlLnZhbHVlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBlcnJvcihlcnIpIHtcbiAgICAgICAgICAgIGNvbnRyb2xsZXIuZXJyb3IoZXJyKTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGNvbXBsZXRlKCkge1xuICAgICAgICAgICAgY2hpbGRTZXRTdWJzLmRlbGV0ZShjaGlsZFNldCk7XG4gICAgICAgICAgICBpZiAobWFpblN1YkNvbXBsZXRlZCAmJiBjaGlsZFNldFN1YnMuc2l6ZSA9PT0gMCkge1xuICAgICAgICAgICAgICBjb250cm9sbGVyLmVuZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICA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2hpbGRTZXQpIHRocm93IG5ldyBFcnJvcigncmVtb3ZlZCB2YWx1ZSBub3QgaW4gbGl2ZXNldCcpO1xuICAgICAgICAgICAgICBjaGlsZFNldC52YWx1ZXMoKS5mb3JFYWNoKHZhbHVlID0+IHtcbiAgICAgICAgICAgICAgICBjb250cm9sbGVyLnJlbW92ZSh2YWx1ZSk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICBjaGlsZFNldHMuZGVsZXRlKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgICAgIGNvbnN0IGNoaWxkU2V0U3ViID0gY2hpbGRTZXRTdWJzLmdldChjaGlsZFNldCk7XG4gICAgICAgICAgICAgIGlmIChjaGlsZFNldFN1Yikge1xuICAgICAgICAgICAgICAgIC8vIFdlIHdvbid0IGhhdmUgdGhlIHN1YnNjcmlwdGlvbiBpZiB0aGUgY2hpbGRTZXQgZW5kZWQgYWxyZWFkeVxuICAgICAgICAgICAgICAgIGNoaWxkU2V0U3ViLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgICAgICAgICAgY2hpbGRTZXRTdWJzLmRlbGV0ZShjaGlsZFNldCk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgZXJyb3IoZXJyKSB7XG4gICAgICAgICAgY29udHJvbGxlci5lcnJvcihlcnIpO1xuICAgICAgICB9LFxuICAgICAgICBjb21wbGV0ZSgpIHtcbiAgICAgICAgICBtYWluU3ViQ29tcGxldGVkID0gdHJ1ZTtcbiAgICAgICAgICBpZiAoaGFzU3Vic2NyaWJlZFRvQ2hpbGRyZW4gJiYgY2hpbGRTZXRTdWJzLnNpemUgPT09IDApIHtcbiAgICAgICAgICAgIGNvbnRyb2xsZXIuZW5kKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcblxuICAgICAgbGV0IGlzUHVsbGluZ0NoYW5nZXMgPSBmYWxzZTtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHVuc3Vic2NyaWJlKCkge1xuICAgICAgICAgIG1haW5TdWIudW5zdWJzY3JpYmUoKTtcbiAgICAgICAgICBjaGlsZFNldFN1YnMuZm9yRWFjaChzdWIgPT4ge1xuICAgICAgICAgICAgc3ViLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgY2hpbGRTZXRzLmNsZWFyKCk7XG4gICAgICAgICAgY2hpbGRTZXRTdWJzLmNsZWFyKCk7XG4gICAgICAgIH0sXG4gICAgICAgIHB1bGxDaGFuZ2VzKCkge1xuICAgICAgICAgIGlmIChpc1B1bGxpbmdDaGFuZ2VzKSByZXR1cm47XG4gICAgICAgICAgaXNQdWxsaW5nQ2hhbmdlcyA9IHRydWU7XG5cbiAgICAgICAgICBkbyB7XG4gICAgICAgICAgICBuZXh0SGFzRmlyZWQgPSBmYWxzZTtcbiAgICAgICAgICAgIG1haW5TdWIucHVsbENoYW5nZXMoKTtcbiAgICAgICAgICAgIGNoaWxkU2V0U3Vicy5mb3JFYWNoKHN1YiA9PiB7XG4gICAgICAgICAgICAgIHN1Yi5wdWxsQ2hhbmdlcygpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSB3aGlsZSAobmV4dEhhc0ZpcmVkKTtcblxuICAgICAgICAgIGlzUHVsbGluZ0NoYW5nZXMgPSBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9XG4gIH0pO1xufVxuIl19
{
"name": "live-set",
"version": "0.3.8",
"version": "0.3.9",
"description": "Class representing a changing and transformable collection of items.",

@@ -5,0 +5,0 @@ "main": "index.js",

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