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.4 to 0.3.5

27

filter.js

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

listen: function listen(setValues, controller) {
var passedFilter = new _set2.default();
var initialValues = new _set2.default();
var sub = liveSet.subscribe({
start: function start() {
liveSet.values().forEach(function (value) {
if (cb(value)) {
passedFilter.add(value);
initialValues.add(value);
}
});
},
next: function next(changes) {

@@ -56,15 +67,3 @@ changes.forEach(function (change) {

var passedFilter = new _set2.default();
{
(function () {
var s = new _set2.default();
liveSet.values().forEach(function (value) {
if (cb(value)) {
passedFilter.add(value);
s.add(value);
}
});
setValues(s);
})();
}
setValues(initialValues);

@@ -77,2 +76,2 @@ return sub;

module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9maWx0ZXIuanMiXSwibmFtZXMiOlsiZmlsdGVyIiwibGl2ZVNldCIsImNiIiwicmVhZCIsInJldCIsInZhbHVlcyIsImZvckVhY2giLCJ2YWx1ZSIsImFkZCIsImxpc3RlbiIsInNldFZhbHVlcyIsImNvbnRyb2xsZXIiLCJzdWIiLCJzdWJzY3JpYmUiLCJuZXh0IiwiY2hhbmdlcyIsImNoYW5nZSIsInR5cGUiLCJwYXNzZWRGaWx0ZXIiLCJoYXMiLCJkZWxldGUiLCJyZW1vdmUiLCJlcnJvciIsImVyciIsImNvbXBsZXRlIiwiZW5kIiwicyJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztrQkFJd0JBLE07O0FBRnhCOzs7Ozs7QUFFZSxTQUFTQSxNQUFULENBQW1CQyxPQUFuQixFQUF3Q0MsRUFBeEMsRUFBMkU7QUFDeEYsU0FBTyxlQUFZO0FBQ2pCQyxRQURp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ICBuZXh0KGNoYW5nZXMpIHtcbiAgICAgICAgICBjaGFuZ2VzLmZvckVhY2goY2hhbmdlID0+IHtcbiAgICAgICAgICAgIGlmIChjaGFuZ2UudHlwZSA9PT0gJ2FkZCcpIHtcbiAgICAgICAgICAgICAgaWYgKGNiKGNoYW5nZS52YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICBwYXNzZWRGaWx0ZXIuYWRkKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgICAgICAgY29udHJvbGxlci5hZGQoY2hhbmdlLnZhbHVlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChjaGFuZ2UudHlwZSA9PT0gJ3JlbW92ZScpIHtcbiAgICAgICAgICAgICAgaWYgKHBhc3NlZEZpbHRlci5oYXMoY2hhbmdlLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgIHBhc3NlZEZpbHRlci5kZWxldGUoY2hhbmdlLnZhbHVlKTtcbiAgICAgICAgICAgICAgICBjb250cm9sbGVyLnJlbW92ZShjaGFuZ2UudmFsdWUpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIGVycm9yKGVycikge1xuICAgICAgICAgIGNvbnRyb2xsZXIuZXJyb3IoZXJyKTtcbiAgICAgICAgfSxcbiAgICAgICAgY29tcGxldGUoKSB7XG4gICAgICAgICAgY29udHJvbGxlci5lbmQoKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IHBhc3NlZEZpbHRlciA9IG5ldyBTZXQoKTtcbiAgICAgIHtcbiAgICAgICAgY29uc3QgcyA9IG5ldyBTZXQoKTtcbiAgICAgICAgbGl2ZVNldC52YWx1ZXMoKS5mb3JFYWNoKHZhbHVlID0+IHtcbiAgICAgICAgICBpZiAoY2IodmFsdWUpKSB7XG4gICAgICAgICAgICBwYXNzZWRGaWx0ZXIuYWRkKHZhbHVlKTtcbi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odmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBuZXh0KGNoYW5nZXMpIHtcbiAgICAgICAgICBjaGFuZ2VzLmZvckVhY2goY2hhbmdlID0+IHtcbiAgICAgICAgICAgIGlmIChjaGFuZ2UudHlwZSA9PT0gJ2FkZCcpIHtcbiAgICAgICAgICAgICAgaWYgKGNiKGNoYW5nZS52YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICBwYXNzZWRGaWx0ZXIuYWRkKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgICAgICAgY29udHJvbGxlci5hZGQoY2hhbmdlLnZhbHVlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChjaGFuZ2UudHlwZSA9PT0gJ3JlbW92ZScpIHtcbiAgICAgICAgICAgICAgaWYgKHBhc3NlZEZpbHRlci5oYXMoY2hhbmdlLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgIHBhc3NlZEZpbHRlci5kZWxldGUoY2hhbmdlLnZhbHVlKTtcbiAgICAgICAgICAgICAgICBjb250cm9sbGVyLnJlbW92ZShjaGFuZ2UudmFsdWUpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIGVycm9yKGVycikge1xuICAgICAgICAgIGNvbnRyb2xsZXIuZXJyb3IoZXJyKTtcbiAgICAgICAgfSxcbiAgICAgICAgY29tcGxldGUoKSB7XG4gICAgICAgICAgY29udHJvbGxlci5lbmQoKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIHNldFZhbHVlcyhpbml0aWFsVmFsdWVzKTtcblxuICAgICAgcmV0dXJuIHN1YjtcbiAgICB9XG4gIH0pO1xufVxuIl19

@@ -52,2 +52,5 @@ 'use strict';

childSetSubs.set(childSet, sub);
childSet.values().forEach(function (value) {
controller.add(value);
});
},

@@ -85,5 +88,2 @@ next: function next(changes) {

childSetSubscribe(childSet, change.value);
childSet.values().forEach(function (value) {
controller.add(value);
});
} else if (change.type === 'remove') {

@@ -121,5 +121,2 @@ var _childSet = childSets.get(change.value);

childSetSubscribe(childSet, value);
childSet.values().forEach(function (value) {
controller.add(value);
});
});

@@ -136,2 +133,3 @@ hasSubscribedToChildren = true;

childSets.clear();
childSetSubs.clear();
},

@@ -158,2 +156,2 @@ pullChanges: function pullChanges() {

module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9mbGF0TWFwLmpzIl0sIm5hbWVzIjpbImZsYXRNYXAiLCJsaXZlU2V0IiwiY2IiLCJpc1JlYWRpbmciLCJyZWFkIiwiRXJyb3IiLCJzIiwidmFsdWVzIiwiZm9yRWFjaCIsImNoaWxkU2V0IiwidmFsdWUiLCJhZGQiLCJsaXN0ZW4iLCJzZXRWYWx1ZXMiLCJjb250cm9sbGVyIiwibWFpblN1YkNvbXBsZXRlZCIsImhhc1N1YnNjcmliZWRUb0NoaWxkcmVuIiwibmV4dEhhc0ZpcmVkIiwiY2hpbGRTZXRTdWJzIiwiY2hpbGRTZXRTdWJzY3JpYmUiLCJzdWJzY3JpYmUiLCJzdGFydCIsInN1YiIsInNldCIsIm5leHQiLCJjaGFuZ2VzIiwiY2hhbmdlIiwidHlwZSIsInJlbW92ZSIsImVycm9yIiwiZXJyIiwiY29tcGxldGUiLCJkZWxldGUiLCJjaGlsZFNldHMiLCJzaXplIiwiZW5kIiwibWFpblN1YiIsImdldCIsImNoaWxkU2V0U3ViIiwidW5zdWJzY3JpYmUiLCJpc1B1bGxpbmdDaGFuZ2VzIiwiY2xlYXIiLCJwdWxsQ2hhbmdlcyJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7a0JBS3dCQSxPOztBQUh4Qjs7Ozs7O0FBR2UsU0FBU0EsT0FBVCxDQUFzQkMsT0FBdEIsRUFBMkNDLEVBQ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CgpO1xuXG4gICAgICBmdW5jdGlvbiBjaGlsZFNldFN1YnNjcmliZShjaGlsZFNldDogTGl2ZVNldDxVPiwgdmFsdWU6IFQpIHtcbiAgICAgICAgY2hpbGRTZXQuc3Vic2NyaWJlKHtcbiAgICAgICAgICBzdGFydChzdWIpIHtcbiAgICAgICAgICAgIGNoaWxkU2V0U3Vicy5zZXQoY2hpbGRTZXQsIHN1Yik7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBuZXh0KGNoYW5nZXMpIHtcbiAgICAgICAgICAgIG5leHRIYXNGaXJlZCA9IHRydWU7XG4gICAgICAgICAgICBjaGFuZ2VzLmZvckVhY2goY2hhbmdlID0+IHtcbiAgICAgICAgICAgICAgaWYgKGNoYW5nZS50eXBlID09PSAnYWRkJykge1xuICAgICAgICAgICAgICAgIGNvbnRyb2xsZXIuYWRkKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hhbmdlLnR5cGUgPT09ICdyZW1vdmUnKSB7XG4gICAgICAgICAgICAgICAgY29udHJvbGxlci5yZW1vdmUoY2hhbmdlLnZhbHVlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBlcnJvcihlcnIpIHtcbiAgICAgICAgICAgIGNvbnRyb2xsZXIuZXJyb3IoZXJyKTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGNvbXBsZXRlKCkge1xuICAgICAgICAgICAgY2hpbGRTZXRTdWJzLmRlbGV0ZShjaGlsZFNldCk7XG4gICAgICAgICAgICBjaGlsZFNldHMuZGVsZXRlKHZhbHVlKTtcbiAgICAgICAgICAgIGlmIChtYWluU3ViQ29tcGxldGVkICYmIGNoaWxkU2V0U3Vicy5zaXplID09PSAwKSB7XG4gICAgICAgICAgICAgIGNvbnRyb2xsZXIuZW5kKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH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ZhbHVlID0+IHtcbiAgICAgICAgICAgICAgICBjb250cm9sbGVyLnJlbW92ZSh2YWx1ZSk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICBjaGlsZFNldFN1Yi51bnN1YnNjcmliZSgpO1xuICAgICAgICAgICAgICBjaGlsZFNldFN1YnMuZGVsZXRlKGNoaWxkU2V0KTtcbiAgICAgICAgICAgICAgY2hpbGRTZXRzLmRlbGV0ZShjaGFuZ2UudmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBlcnJvcihlcnIpIHtcbiAgICAgICAgICBjb250cm9sbGVyLmVycm9yKGVycik7XG4gICAgICAgIH0sXG4gICAgICAgIGNvbXBsZXRlKCkge1xuICAgICAgICAgIG1haW5TdWJDb21wbGV0ZWQgPSB0cnVlO1xuICAgICAgICAgIGlmIChoYXNTdWJzY3JpYmVkVG9DaGlsZHJlbiAmJiBjaGlsZFNldFN1YnMuc2l6ZSA9PT0gMCkge1xuICAgICAgICAgICAgY29udHJvbGxlci5lbmQoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuXG4gICAgICBzZXRWYWx1ZXMobmV3IFNldCgpKTtcblxuICAgICAgY29uc3QgY2hpbGRTZXRzOiBNYXA8VCwgTGl2ZVNldDxVPj4gPSBuZXcgTWFwKCk7XG4gICAgICBsaXZlU2V0LnZhbHVlcygpLmZvckVhY2godmFsdWUgPT4ge1xuICAgICAgICBjb25zdCBjaGlsZFNldCA9IGNiKHZhbHVlKTtcbiAgICAgICAgY2hpbGRTZXRzLnNldCh2YWx1ZSwgY2hpbGRTZXQpO1xuICAgICAgICBjaGlsZFNldFN1YnNjcmliZShjaGlsZFNldCwgdmFsdWUpO1xuICAgICAgICBjaGlsZFNldC52YWx1ZXMoKS5mb3JFYWNoKHZhbHVlID0+IHtcbiAgICAgICAgICBjb250cm9sbGVyLmFkZCh2YWx1ZSk7XG4gICAgICAgIH0pO1xuICAgICAgfSk7XG4gICAgICBoYXNTdWJzY3JpYmVkVG9DaGlsZHJlbiA9IHRydWU7XG5cbiAgICAgIGxldCBpc1B1bGxpbmdDaGFuZ2VzID0gZmFsc2U7XG4gICAgICByZXR1cm4ge1xuICAgICAgICB1bnN1YnNjcmliZSgpIHtcbiAgICAgICAgICBtYWluU3ViLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgICAgY2hpbGRTZXRTdWJzLmZvckVhY2goc3ViID0+IHtcbiAgICAgICAgICAgIHN1Yi51bnN1YnNjcmliZSgpO1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIGNoaWxkU2V0cy5jbGVhcigpO1xuICAgICAgICB9LFxuICAgICAgICBwdWxsQ2hhbmdlcygpIHtcbiAgICAgICAgICBpZiAoaXNQdWxsaW5nQ2hhbmdlcykgcmV0dXJuO1xuICAgICAgICAgIGlzUHVsbGluZ0NoYW5nZXMgPSB0cnVlO1xuXG4gICAgICAgICAgZG8ge1xuICAgICAgICAgICAgbmV4dEhhc0ZpcmVkID0gZmFsc2U7XG4gICAgICAgICAgICBtYWluU3ViLnB1bGxDaGFuZ2VzKCk7XG4gICAgICAgICAgICBjaGlsZFNldFN1YnMuZm9yRWFjaChzdWIgPT4ge1xuICAgICAgICAgICAgICBzdWIucHVsbENoYW5nZXMoKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0gd2hpbGUgKG5leHRIYXNGaXJlZCk7XG5cbiAgICAgICAgICBpc1B1bGxpbmdDaGFuZ2VzID0gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfVxuICB9KTtcbn1cbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9mbGF0TWFwLmpzIl0sIm5hbWVzIjpbImZsYXRNYXAiLCJsaXZlU2V0IiwiY2IiLCJpc1JlYWRpbmciLCJyZWFkIiwiRXJyb3IiLCJzIiwidmFsdWVzIiwiZm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AgICAgICAgaWYgKGNoYW5nZS50eXBlID09PSAnYWRkJykge1xuICAgICAgICAgICAgICAgIGNvbnRyb2xsZXIuYWRkKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hhbmdlLnR5cGUgPT09ICdyZW1vdmUnKSB7XG4gICAgICAgICAgICAgICAgY29udHJvbGxlci5yZW1vdmUoY2hhbmdlLnZhbHVlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBlcnJvcihlcnIpIHtcbiAgICAgICAgICAgIGNvbnRyb2xsZXIuZXJyb3IoZXJyKTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGNvbXBsZXRlKCkge1xuICAgICAgICAgICAgY2hpbGRTZXRTdWJzLmRlbGV0ZShjaGlsZFNldCk7XG4gICAgICAgICAgICBjaGlsZFNldHMuZGVsZXRlKHZhbHVlKTtcbiAgICAgICAgICAgIGlmIChtYWluU3ViQ29tcGxldGVkICYmIGNoaWxkU2V0U3Vicy5zaXplID09PSAwKSB7XG4gICAgICAgICAgICAgIGNvbnRyb2xsZXIuZW5kKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgbWFpblN1YiA9IGxpdmVTZXQuc3Vic2NyaWJlKHtcbiAgICAgICAgbmV4dChjaGFuZ2VzKSB7XG4gICAgICAgICAgbmV4dEhhc0ZpcmVkID0gdHJ1ZTtcbiAgICAgICAgICBjaGFuZ2VzLmZvckVhY2goY2hhbmdlID0+IHtcbiAgICAgICAgICAgIGlmIChjaGFuZ2UudHlwZSA9PT0gJ2FkZCcpIHtcbiAgICAgICAgICAgICAgY29uc3QgY2hpbGRTZXQgPSBjYihjaGFuZ2UudmFsdWUpO1xuICAgICAgICAgICAgICBjaGlsZFNldHMuc2V0KGNoYW5nZS52YWx1ZSwgY2hpbGRTZXQpO1xuICAgICAgICAgICAgICBjaGlsZFNldFN1YnNjcmliZShjaGlsZFNldCwgY2hhbmdlLnZhbHVlKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hhbmdlLnR5cGUgPT09ICdyZW1vdmUnKSB7XG4gICAgICAgICAgICAgIGNvbnN0IGNoaWxkU2V0ID0gY2hpbGRTZXRzLmdldChjaGFuZ2UudmFsdWUpO1xuICAgICAgICAgICAgICBpZiAoIWNoaWxkU2V0KSB0aHJvdyBuZXcgRXJyb3IoJ3JlbW92ZWQgdmFsdWUgbm90IGluIGxpdmVzZXQnKTtcbiAgICAgICAgICAgICAgY29uc3QgY2hpbGRTZXRTdWIgPSBjaGlsZFNldFN1YnMuZ2V0KGNoaWxkU2V0KTtcbiAgICAgICAgICAgICAgaWYgKCFjaGlsZFNldFN1YikgdGhyb3cgRXJyb3IoJ2NoaWxkU2V0IHdhcyBub3Qgc3Vic2NyaWJlZCB0bycpO1xuICAgICAgICAgICAgICBjaGlsZFNldC52YWx1ZXMoKS5mb3JFYWNoKHZhbHVlID0+IHtcbiAgICAgICAgICAgICAgICBjb250cm9sbGVyLnJlbW92ZSh2YWx1ZSk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICBjaGlsZFNldFN1Yi51bnN1YnNjcmliZSgpO1xuICAgICAgICAgICAgICBjaGlsZFNldFN1YnMuZGVsZXRlKGNoaWxkU2V0KTtcbiAgICAgICAgICAgICAgY2hpbGRTZXRzLmRlbGV0ZShjaGFuZ2UudmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBlcnJvcihlcnIpIHtcbiAgICAgICAgICBjb250cm9sbGVyLmVycm9yKGVycik7XG4gICAgICAgIH0sXG4gICAgICAgIGNvbXBsZXRlKCkge1xuICAgICAgICAgIG1haW5TdWJDb21wbGV0ZWQgPSB0cnVlO1xuICAgICAgICAgIGlmIChoYXNTdWJzY3JpYmVkVG9DaGlsZHJlbiAmJiBjaGlsZFNldFN1YnMuc2l6ZSA9PT0gMCkge1xuICAgICAgICAgICAgY29udHJvbGxlci5lbmQoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuXG4gICAgICBzZXRWYWx1ZXMobmV3IFNldCgpKTtcblxuICAgICAgY29uc3QgY2hpbGRTZXRzOiBNYXA8VCwgTGl2ZVNldDxVPj4gPSBuZXcgTWFwKCk7XG4gICAgICBsaXZlU2V0LnZhbHVlcygpLmZvckVhY2godmFsdWUgPT4ge1xuICAgICAgICBjb25zdCBjaGlsZFNldCA9IGNiKHZhbHVlKTtcbiAgICAgICAgY2hpbGRTZXRzLnNldCh2YWx1ZSwgY2hpbGRTZXQpO1xuICAgICAgICBjaGlsZFNldFN1YnNjcmliZShjaGlsZFNldCwgdmFsdWUpO1xuICAgICAgfSk7XG4gICAgICBoYXNTdWJzY3JpYmVkVG9DaGlsZHJlbiA9IHRydWU7XG5cbiAgICAgIGxldCBpc1B1bGxpbmdDaGFuZ2VzID0gZmFsc2U7XG4gICAgICByZXR1cm4ge1xuICAgICAgICB1bnN1YnNjcmliZSgpIHtcbiAgICAgICAgICBtYWluU3ViLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgICAgY2hpbGRTZXRTdWJzLmZvckVhY2goc3ViID0+IHtcbiAgICAgICAgICAgIHN1Yi51bnN1YnNjcmliZSgpO1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIGNoaWxkU2V0cy5jbGVhcigpO1xuICAgICAgICAgIGNoaWxkU2V0U3Vicy5jbGVhcigpO1xuICAgICAgICB9LFxuICAgICAgICBwdWxsQ2hhbmdlcygpIHtcbiAgICAgICAgICBpZiAoaXNQdWxsaW5nQ2hhbmdlcykgcmV0dXJuO1xuICAgICAgICAgIGlzUHVsbGluZ0NoYW5nZXMgPSB0cnVlO1xuXG4gICAgICAgICAgZG8ge1xuICAgICAgICAgICAgbmV4dEhhc0ZpcmVkID0gZmFsc2U7XG4gICAgICAgICAgICBtYWluU3ViLnB1bGxDaGFuZ2VzKCk7XG4gICAgICAgICAgICBjaGlsZFNldFN1YnMuZm9yRWFjaChzdWIgPT4ge1xuICAgICAgICAgICAgICBzdWIucHVsbENoYW5nZXMoKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0gd2hpbGUgKG5leHRIYXNGaXJlZCk7XG5cbiAgICAgICAgICBpc1B1bGxpbmdDaGFuZ2VzID0gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfVxuICB9KTtcbn1cbiJdfQ==

@@ -165,4 +165,12 @@ 'use strict';

}
if (!subscription.closed && observer.complete) {
observer.complete();
if (!subscription.closed) {
if (_this2._endedWithError) {
if (observer.error) {
observer.error(_this2._error);
}
} else {
if (observer.complete) {
observer.complete();
}
}
}

@@ -179,8 +187,14 @@ subscription.closed = true;

var observerRecord = { observer: observer, ignore: this._changeQueue.length };
this._observers.push(observerRecord);
var isStarting = true;
var unsubscribedInStart = false;
var subscription = {
/*:: closed: false&&` */get closed() {
return liveSet._observers.indexOf(observerRecord) < 0;
return !isStarting && liveSet._observers.indexOf(observerRecord) < 0;
} /*:: ` */
, unsubscribe: function unsubscribe() {
if (isStarting) {
unsubscribedInStart = true;
return;
}
var ix = _this2._observers.indexOf(observerRecord);

@@ -210,7 +224,4 @@ if (ix >= 0) {

};
if (observer.start) {
observer.start(subscription);
}
// Check that they haven't immediately unsubscribed
if (!this._active && !subscription.closed) {
if (!this._active) {
(function () {

@@ -282,3 +293,2 @@ var controller = {

}
observerRecord.ignore = _this2._changeQueue.length;
if (typeof listenHandlerOrFunction === 'function') {

@@ -300,2 +310,12 @@ active.listenHandler = {

if (observer.start) {
observer.start(subscription);
}
isStarting = false;
observerRecord.ignore = this._changeQueue.length;
if (!unsubscribedInStart) {
this._observers.push(observerRecord);
}
return subscription;

@@ -343,2 +363,2 @@ }

module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIj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3JlID09PSAwKSB7XG4gICAgICAgICAgICAgIG9ic2VydmVyTmV4dC5jYWxsKG9ic2VydmVyLCBjaGFuZ2VzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJlY29yZC5pZ25vcmUgPSAwO1xuICAgICAgICAgICAgICBjb25zdCBjaGFuZ2VzVG9EZWxpdmVyID0gY2hhbmdlcy5zbGljZShpZ25vcmUpO1xuICAgICAgICAgICAgICBpZiAoY2hhbmdlc1RvRGVsaXZlci5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBvYnNlcnZlck5leHQuY2FsbChvYnNlcnZlciwgY2hhbmdlc1RvRGVsaXZlcik7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGVuZGVkKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5fZW5kZWRXaXRoRXJyb3IpIHtcbiAgICAgICAgICAgICAgaWYgKG9ic2VydmVyLmVycm9yKSBvYnNlcnZlci5lcnJvcih0aGlzLl9lcnJvcik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBpZiAob2JzZXJ2ZXIuY29tcGxldGUpIG9ic2VydmVyLmNvbXBsZXRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH0pO1xuICAgIH1cbiAgfVxuXG4gIF9kZWFjdGl2YXRlKCkge1xuICAgIGlmICghdGhpcy5fYWN0aXZlKSB0aHJvdyBuZXcgRXJyb3IoJ2FscmVhZHkgaW5hY3RpdmUnKTtcbiAgICBjb25zdCB7bGlzdGVuSGFuZGxlcn0gPSB0aGlzLl9hY3RpdmU7XG4gICAgdGhpcy5fYWN0aXZlID0gbnVsbDtcbiAgICBpZiAobGlzdGVuSGFuZGxlcikge1xuICAgICAgbGlzdGVuSGFuZGxlci51bnN1YnNjcmliZSgpO1xuICAgIH1cbiAgfVxuXG4gIHZhbHVl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xsZXIuY2xvc2VkKSB7XG4gICAgICAgIHRoaXMuX2FjdGl2ZSA9IGFjdGl2ZTtcbiAgICAgICAgdGhpcy5fZGVhY3RpdmF0ZSgpO1xuICAgICAgfVxuICAgIH1cblxuICAgIGlmIChvYnNlcnZlci5zdGFydCkge1xuICAgICAgb2JzZXJ2ZXIuc3RhcnQoc3Vic2NyaXB0aW9uKTtcbiAgICB9XG4gICAgaXNTdGFydGluZyA9IGZhbHNlO1xuXG4gICAgb2JzZXJ2ZXJSZWNvcmQuaWdub3JlID0gdGhpcy5fY2hhbmdlUXVldWUubGVuZ3RoO1xuICAgIGlmICghdW5zdWJzY3JpYmVkSW5TdGFydCkge1xuICAgICAgdGhpcy5fb2JzZXJ2ZXJzLnB1c2gob2JzZXJ2ZXJSZWNvcmQpO1xuICAgIH1cblxuICAgIHJldHVybiBzdWJzY3JpcHRpb247XG4gIH1cbn1cblxuLy8gQXNzaWduIGhlcmUgYmVjYXVzZSBGbG93IGRvZXNuJ3Qgc3VwcG9ydCBjb21wdXRlZCBwcm9wZXJ0eSBrZXlzIG9uIGNsYXNzZXM6XG4vLyBodHRwczovL2dpdGh1Yi5jb20vZmFjZWJvb2svZmxvdy9pc3N1ZXMvMjI4NlxuKExpdmVTZXQ6YW55KS5wcm90b3R5cGVbJCRvYnNlcnZhYmxlXSA9IGZ1bmN0aW9uKCkge1xuICByZXR1cm4gdGhpcztcbn07XG4iXX0=

@@ -33,3 +33,13 @@ 'use strict';

listen: function listen(setValues, controller) {
var m = new _map2.default();
var s = new _set2.default();
var sub = liveSet.subscribe({
start: function start() {
liveSet.values().forEach(function (value) {
var newValue = cb(value);
m.set(value, newValue);
s.add(newValue);
});
},
next: function next(changes) {

@@ -57,9 +67,2 @@ changes.forEach(function (change) {

var m = new _map2.default();
var s = new _set2.default();
liveSet.values().forEach(function (value) {
var newValue = cb(value);
m.set(value, newValue);
s.add(newValue);
});
setValues(s);

@@ -73,2 +76,2 @@

module.exports = exports['default'];
//# sourceMappingUR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7XG4gICAgICAgICAgICAgIGNvbnRyb2xsZXIucmVtb3ZlKG5ld1ZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgZXJyb3IoZXJyKSB7XG4gICAgICAgICAgY29udHJvbGxlci5lcnJvcihlcnIpO1xuICAgICAgICB9LFxuICAgICAgICBjb21wbGV0ZSgpIHtcbiAgICAgICAgICBjb250cm9sbGVyLmVuZCgpO1xuICAgICAgICB9XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgbTogTWFwPFQsVT4gPSBuZXcgTWFwKCk7XG4gICAgICBjb25zdCBzID0gbmV3IFNldCgpO1xuICAgICAgbGl2ZVNldC52YWx1ZXMoKS5mb3JFYWNoKHZhbHVlID0+IHtcbiAgICAgICAgY29uc3QgbmV3VmFsdWUgPSBjYih2YWx1ZSk7XG4gICAgICAgIG0uc2V0KHZhbHVlLCBuZXdWYWx1ZSk7XG4gICAgICAgIHMuYWRkKG5ld1ZhbHVlKTtcbiAgICAgIH0pO1xuICAgICAgc2V0VmFsdWVzKHMpO1xuXG4gICAgICByZXR1cm4gc3ViO1xuICAgIH1cbiAgfSk7XG59XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9tYXAuanMiXSwibmFtZXMiOlsibWFwIiwibGl2ZVNldCIsImNiIiwicmVhZCIsInMiLCJ2YWx1ZXMiLCJmb3JFYWNoIiwiYWRkIiwidmFsdWUiLCJsaXN0ZW4iLCJzZXRWYWx1ZXMiLCJjb250cm9sbGVyIiwibSIsInN1YiIsInN1YnNjcmliZSIsInN0YXJ0IiwibmV3VmFsdWUiLCJzZXQiLCJuZXh0IiwiY2hhbmdlcyIsImNoYW5nZSIsInR5cGUiLCJnZXQiLCJFcnJvciIsImRlbGV0ZSIsInJlbW92ZSIsImVycm9yIiwiZXJyIiwiY29tcGxldGUiLCJlbmQiXSwibWFwcGluZ3MiOiI7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TtcbiAgICAgIHJldHVybiBzO1xuICAgIH0sXG4gICAgbGlzdGVuKHNldFZhbHVlcywgY29udHJvbGxlcikge1xuICAgICAgY29uc3QgbTogTWFwPFQsVT4gPSBuZXcgTWFwKCk7XG4gICAgICBjb25zdCBzID0gbmV3IFNldCgpO1xuXG4gICAgICBjb25zdCBzdWIgPSBsaXZlU2V0LnN1YnNjcmliZSh7XG4gICAgICAgIHN0YXJ0KCkge1xuICAgICAgICAgIGxpdmVTZXQudmFsdWVzKCkuZm9yRWFjaCh2YWx1ZSA9PiB7XG4gICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IGNiKHZhbHVlKTtcbiAgICAgICAgICAgIG0uc2V0KHZhbHVlLCBuZXdWYWx1ZSk7XG4gICAgICAgICAgICBzLmFkZChuZXdWYWx1ZSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIG5leHQoY2hhbmdlcykge1xuICAgICAgICAgIGNoYW5nZXMuZm9yRWFjaChjaGFuZ2UgPT4ge1xuICAgICAgICAgICAgaWYgKGNoYW5nZS50eXBlID09PSAnYWRkJykge1xuICAgICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IGNiKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgICAgIG0uc2V0KGNoYW5nZS52YWx1ZSwgbmV3VmFsdWUpO1xuICAgICAgICAgICAgICBjb250cm9sbGVyLmFkZChuZXdWYWx1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoYW5nZS50eXBlID09PSAncmVtb3ZlJykge1xuICAgICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IG0uZ2V0KGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgICAgIGlmICghbmV3VmFsdWUpIHRocm93IG5ldyBFcnJvcigncmVtb3ZlZCBpdGVtIG5vdCBpbiBsaXZlc2V0Jyk7XG4gICAgICAgICAgICAgIG0uZGVsZXRlKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgICAgIGNvbnRyb2xsZXIucmVtb3ZlKG5ld1ZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgZXJyb3IoZXJyKSB7XG4gICAgICAgICAgY29udHJvbGxlci5lcnJvcihlcnIpO1xuICAgICAgICB9LFxuICAgICAgICBjb21wbGV0ZSgpIHtcbiAgICAgICAgICBjb250cm9sbGVyLmVuZCgpO1xuICAgICAgICB9XG4gICAgICB9KTtcblxuICAgICAgc2V0VmFsdWVzKHMpO1xuXG4gICAgICByZXR1cm4gc3ViO1xuICAgIH1cbiAgfSk7XG59XG4iXX0=

@@ -40,2 +40,5 @@ 'use strict';

subs.add(sub);
liveSet.values().forEach(function (value) {
initialValues.add(value);
});
},

@@ -61,5 +64,2 @@ next: function next(changes) {

});
liveSet.values().forEach(function (value) {
initialValues.add(value);
});
});

@@ -90,2 +90,2 @@

module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9tZXJnZS5qcyJdLCJuYW1lcyI6WyJtZXJnZSIsImxpdmVTZXRzIiwicmVhZCIsInMiLCJmb3JFYWNoIiwibGl2ZVNldCIsInZhbHVlcyIsImFkZCIsInZhbHVlIiwibGlzdGVuIiwic2V0VmFsdWVzIiwiY29udHJvbGxlciIsImluaXRpYWxWYWx1ZXMiLCJzdWJzIiwiZG9uZVN1YnNjcmliaW5nIiwic3ViIiwic3Vic2NyaWJlIiwic3RhcnQiLCJfc3ViIiwibmV4dCIsImNoYW5nZXMiLCJjaGFuZ2UiLCJ0eXBlIiwicmVtb3ZlIiwiZXJyb3IiLCJlcnIiLCJjb21wbGV0ZSIsImRlbGV0ZSIsInNpemUiLCJlbmQiLCJ1bnN1YnNjcmliZSIsInB1bGxDaGFuZ2VzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O2tCQUl3QkEsSzs7QUFGeEI7Ozs7OztBQUVlLFNBQ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0dXJuIG5ldyBMaXZlU2V0KHtcbiAgICByZWFkKCkge1xuICAgICAgY29uc3QgcyA9IG5ldyBTZXQoKTtcbiAgICAgIGxpdmVTZXRzLmZvckVhY2gobGl2ZVNldCA9PiB7XG4gICAgICAgIGxpdmVTZXQudmFsdWVzKCkuZm9yRWFjaCh2YWx1ZSA9PiB7XG4gICAgICAgICAgcy5hZGQodmFsdWUpO1xuICAgICAgICB9KTtcbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIHM7XG4gICAgfSxcbiAgICBsaXN0ZW4oc2V0VmFsdWVzLCBjb250cm9sbGVyKSB7XG4gICAgICBjb25zdCBpbml0aWFsVmFsdWVzID0gbmV3IFNldCgpO1xuICAgICAgY29uc3Qgc3VicyA9IG5ldyBTZXQoKTtcbiAgICAgIGxldCBkb25lU3Vic2NyaWJpbmcgPSBmYWxzZTtcbiAgICAgIGxpdmVTZXRzLmZvckVhY2gobGl2ZVNldCA9PiB7XG4gICAgICAgIGxldCBzdWI7XG4gICAgICAgIGxpdmVTZXQuc3Vic2NyaWJlKHtcbiAgICAgICAgICBzdGFydChfc3ViKSB7XG4gICAgICAgICAgICBzdWIgPSBfc3ViO1xuICAgICAgICAgICAgc3Vicy5hZGQoc3ViKTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIG5leHQoY2hhbmdlcykge1xuICAgICAgICAgICAgY2hhbmdlcy5mb3JFYWNoKGNoYW5nZSA9PiB7XG4gICAgICAgICAgICAgIGlmIChjaGFuZ2UudHlwZSA9PT0gJ2FkZCcpIHtcbiAgICAgICAgICAgICAgICBjb250cm9sbGVyLmFkZChjaGFuZ2UudmFsdWUpO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoYW5nZS50eXBlID09PSAncmVtb3ZlJykge1xuICAgICAgICAgICAgICAgIGNvbnRyb2xsZXIucmVtb3ZlKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgZXJyb3IoZXJyKSB7XG4gICAgICAgICAgICBjb250cm9sbGVyLmVycm9yKGVycik7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBjb21wbGV0ZSgpIHtcbiAgICAgICAgICAgIHN1YnMuZGVsZXRlKHN1Yik7XG4gICAgICAgICAgICBpZiAoZG9uZVN1YnNjcmliaW5nICYmIHN1YnMuc2l6ZSA9PT0gMCkge1xuICAgICAgICAgICAgICBjb250cm9sbGVyLmVuZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGxpdmVTZXQudmFsdWVzKCkuZm9yRWFjaCh2YWx1ZSA9PiB7XG4gICAgICAgICAgaW5pdGlhbFZhbHVlcy5hZGQodmFsdWUpO1xuICAgICAgICB9KTtcbiAgICAgIH0pO1xuXG4gICAgICBzZXRWYWx1ZXMoaW5pdGlhbFZhbHVlcyk7XG5cbiAgICAgIGRvbmVTdWJzY3JpYmluZyA9IHRydWU7XG4gICAgICBpZiAoc3Vicy5zaXplID09PSAwKSB7XG4gICAgICAgIGNvbnRyb2xsZXIuZW5kKCk7XG4gICAgICB9XG4gICAgICByZXR1cm4ge1xuICAgICAgICB1bnN1YnNjcmliZSgpIHtcbiAgICAgICAgICBzdWJzLmZvckVhY2goc3ViID0+IHtcbiAgICAgICAgICAgIHN1Yi51bnN1YnNjcmliZSgpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBwdWxsQ2hhbmdlcygpIHtcbiAgICAgICAgICBzdWJzLmZvckVhY2goc3ViID0+IHtcbiAgICAgICAgICAgIHN1Yi5wdWxsQ2hhbmdlcygpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9O1xuICAgIH1cbiAgfSk7XG59XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9tZXJnZS5qcyJdLCJuYW1lcyI6WyJtZXJnZSI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ICAgICBzdWIgPSBfc3ViO1xuICAgICAgICAgICAgc3Vicy5hZGQoc3ViKTtcbiAgICAgICAgICAgIGxpdmVTZXQudmFsdWVzKCkuZm9yRWFjaCh2YWx1ZSA9PiB7XG4gICAgICAgICAgICAgIGluaXRpYWxWYWx1ZXMuYWRkKHZhbHVlKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgbmV4dChjaGFuZ2VzKSB7XG4gICAgICAgICAgICBjaGFuZ2VzLmZvckVhY2goY2hhbmdlID0+IHtcbiAgICAgICAgICAgICAgaWYgKGNoYW5nZS50eXBlID09PSAnYWRkJykge1xuICAgICAgICAgICAgICAgIGNvbnRyb2xsZXIuYWRkKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hhbmdlLnR5cGUgPT09ICdyZW1vdmUnKSB7XG4gICAgICAgICAgICAgICAgY29udHJvbGxlci5yZW1vdmUoY2hhbmdlLnZhbHVlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBlcnJvcihlcnIpIHtcbiAgICAgICAgICAgIGNvbnRyb2xsZXIuZXJyb3IoZXJyKTtcbiAgICAgICAgICB9LFxuICAgICAgICAgIGNvbXBsZXRlKCkge1xuICAgICAgICAgICAgc3Vicy5kZWxldGUoc3ViKTtcbiAgICAgICAgICAgIGlmIChkb25lU3Vic2NyaWJpbmcgJiYgc3Vicy5zaXplID09PSAwKSB7XG4gICAgICAgICAgICAgIGNvbnRyb2xsZXIuZW5kKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH0pO1xuXG4gICAgICBzZXRWYWx1ZXMoaW5pdGlhbFZhbHVlcyk7XG5cbiAgICAgIGRvbmVTdWJzY3JpYmluZyA9IHRydWU7XG4gICAgICBpZiAoc3Vicy5zaXplID09PSAwKSB7XG4gICAgICAgIGNvbnRyb2xsZXIuZW5kKCk7XG4gICAgICB9XG4gICAgICByZXR1cm4ge1xuICAgICAgICB1bnN1YnNjcmliZSgpIHtcbiAgICAgICAgICBzdWJzLmZvckVhY2goc3ViID0+IHtcbiAgICAgICAgICAgIHN1Yi51bnN1YnNjcmliZSgpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBwdWxsQ2hhbmdlcygpIHtcbiAgICAgICAgICBzdWJzLmZvckVhY2goc3ViID0+IHtcbiAgICAgICAgICAgIHN1Yi5wdWxsQ2hhbmdlcygpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9O1xuICAgIH1cbiAgfSk7XG59XG4iXX0=
{
"name": "live-set",
"version": "0.3.4",
"version": "0.3.5",
"description": "Class representing a changing and transformable collection of items.",

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

@@ -52,2 +52,29 @@ 'use strict';

var sub = liveSet.subscribe({
start: function start(sub) {
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = (0, _getIterator3.default)(liveSet.values()), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var value = _step.value;
if (sub.closed) break;
addedItem(value);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
},
next: function next(changes) {

@@ -70,28 +97,2 @@ changes.forEach(function (change) {

var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = (0, _getIterator3.default)(liveSet.values()), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var value = _step.value;
if (sub.closed) break;
addedItem(value);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
return function () {

@@ -106,2 +107,2 @@ sub.unsubscribe();

module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy90b1ZhbHVlT2JzZXJ2YWJsZS5qcyJdLCJuYW1lcyI6WyJ0b1ZhbHVlT2JzZXJ2YWJsZSIsImxpdmVTZXQiLCJyZXNvbHZlcnMiLCJhZGRlZEl0ZW0iLCJ2YWx1ZSIsInJlc29sdmUiLCJyZW1vdmFsIiwiX3Jlc29sdmUiLCJzZXQiLCJvYnNlcnZlciIsIm5leHQiLCJyZW1vdmVkSXRlbSIsInJlc29sdmVyIiwiZ2V0IiwiRXJyb3IiLCJkZWxldGUiLCJzdWIiLCJzdWJzY3JpYmUiLCJjaGFuZ2VzIiwiZm9yRWFjaCIsImNoYW5nZSIsInR5cGUiLCJlcnJvciIsImVyciIsImNvbXBsZXRlIiwidmFsdWVzIiwiY2xvc2VkIiwidW5zdWJzY3JpYmUiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7OztrQkFLd0JBLGlCOztBQUh4Qjs7OztBQUNBOzs7Ozs7QUFFZSxTQUFTQSxpQkFBVCxDQUE4QkMsT0FBOUIsRUFBbUQ7QUFDaEUsU0FBTyw0QkFBZSxvQkFBWTtBQUNoQyxRQUFNQyxZQUE4QixtQkFBcEM7O0FBRUEsYUFBU0MsU0FBVCxDQUFtQkMsS0FBbkIsRUFBNkI7QUFDM0IsVUFBSUMsZ0JBQUo7QUFDQSxVQUFNQyxVQUF5QixzQkFBWSxvQkFBWTtBQUNyREQsa0JBQVVFLFFBQVY7QUFDRCxPQUY4QixDQUEvQjtBQUdBTCxnQkFBVU0sR0FBVixDQUFjSixLQUFkLEVBQXNCQyxPQUF0QjtBQUNBSSxlQUFTQyxJQUFULENBQWMsRUFBQ04sWUFBRCxFQUFRRSxnQkFBUixFQUFkO0FBQ0Q7O0FBRUQsYUFBU0ss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1hcCBmb3IgdmFsdWUnKTtcbiAgICAgIHJlc29sdmVycy5kZWxldGUodmFsdWUpO1xuICAgICAgcmVzb2x2ZXIoKTtcbiAgICB9XG5cbiAgICBjb25zdCBzdWIgPSBsaXZlU2V0LnN1YnNjcmliZSh7XG4gICAgICBuZXh0KGNoYW5nZXMpIHtcbiAgICAgICAgY2hhbmdlcy5mb3JFYWNoKGNoYW5nZSA9PiB7XG4gICAgICAgICAgaWYgKGNoYW5nZS50eXBlID09PSAnYWRkJykge1xuICAgICAgICAgICAgYWRkZWRJdGVtKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgfSBlbHNlIGlmIChjaGFuZ2UudHlwZSA9PT0gJ3JlbW92ZScpIHtcbiAgICAgICAgICAgIHJlbW92ZWRJdGVtKGNoYW5nZS52YWx1ZSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH0sXG4gICAgICBlcnJvcihlcnIpIHtcbiAgICAgICAgb2JzZXJ2ZXIuZXJyb3IoZXJyKTtcbiAgICAgIH0sXG4gICAgICBjb21wbGV0ZSgpIHtcbiAgICAgICAgb2JzZXJ2ZXIuY29tcGxldGUoKTtcbiAgICAgIH1cbiAgICB9KTtcblxuICAgIGZvciAobGV0IHZhbHVlIG9mIGxpdmVTZXQudmFsdWVzKCkpIHtcbiAgICAgIGlmIChzdWIuY2xvc2VkKSBicmVhaztcbiAgICAgIGFkZGVkSXRlbSh2YWx1ZSk7XG4gICAgfVxuXG4gICAgcmV0dXJuICgpID0+IHtcbiAgICAgIHN1Yi51bnN1YnNjcmliZSgpO1xuICAgICAgcmVzb2x2ZXJzLmZvckVhY2gocmVzb2x2ZXIgPT4ge1xuICAgICAgICByZXNvbHZlcigpO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfSk7XG59XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy90b1ZhbHVlT2JzZXJ2YWJsZS5qcyJdLCJu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biAgICAgIHJlc29sdmVyKCk7XG4gICAgfVxuXG4gICAgY29uc3Qgc3ViID0gbGl2ZVNldC5zdWJzY3JpYmUoe1xuICAgICAgc3RhcnQoc3ViKSB7XG4gICAgICAgIGZvciAobGV0IHZhbHVlIG9mIGxpdmVTZXQudmFsdWVzKCkpIHtcbiAgICAgICAgICBpZiAoc3ViLmNsb3NlZCkgYnJlYWs7XG4gICAgICAgICAgYWRkZWRJdGVtKHZhbHVlKTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIG5leHQoY2hhbmdlcykge1xuICAgICAgICBjaGFuZ2VzLmZvckVhY2goY2hhbmdlID0+IHtcbiAgICAgICAgICBpZiAoY2hhbmdlLnR5cGUgPT09ICdhZGQnKSB7XG4gICAgICAgICAgICBhZGRlZEl0ZW0oY2hhbmdlLnZhbHVlKTtcbiAgICAgICAgICB9IGVsc2UgaWYgKGNoYW5nZS50eXBlID09PSAncmVtb3ZlJykge1xuICAgICAgICAgICAgcmVtb3ZlZEl0ZW0oY2hhbmdlLnZhbHVlKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfSxcbiAgICAgIGVycm9yKGVycikge1xuICAgICAgICBvYnNlcnZlci5lcnJvcihlcnIpO1xuICAgICAgfSxcbiAgICAgIGNvbXBsZXRlKCkge1xuICAgICAgICBvYnNlcnZlci5jb21wbGV0ZSgpO1xuICAgICAgfVxuICAgIH0pO1xuXG4gICAgcmV0dXJuICgpID0+IHtcbiAgICAgIHN1Yi51bnN1YnNjcmliZSgpO1xuICAgICAgcmVzb2x2ZXJzLmZvckVhY2gocmVzb2x2ZXIgPT4ge1xuICAgICAgICByZXNvbHZlcigpO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfSk7XG59XG4iXX0=

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

listen: function listen(setValues, controller) {
var initialValues = void 0,
inputToOutputValues = void 0,
xform = void 0,
addsComplete = void 0;
var sub = liveSet.subscribe({
start: function start() {
var ret = valuesAndContext();
initialValues = ret.values;
inputToOutputValues = ret.inputToOutputValues;
xform = ret.xform;
addsComplete = ret.addsComplete;
},
next: function next(changes) {

@@ -158,8 +169,3 @@ for (var i = 0, len = changes.length; i < len; i++) {

var _valuesAndContext = valuesAndContext(),
initialValues = _valuesAndContext.values,
inputToOutputValues = _valuesAndContext.inputToOutputValues,
xform = _valuesAndContext.xform,
addsComplete = _valuesAndContext.addsComplete;
if (!initialValues) throw new Error();
setValues(initialValues);

@@ -172,2 +178,2 @@

module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy90cmFuc2R1Y2UuanMiXSwibmFtZXMiOlsidHJhbnNkdWNlIiwiYXJyYXlYZiIsInJlcyIsImlucHV0IiwicHVzaCIsImxpdmVTZXQiLCJ0cmFuc2R1Y2VyIiwic3RlcCIsInhmb3JtIiwiaW5wdXRWYWx1ZSIsImFkZHNDb21wbGV0ZSIsIm91dHB1dFZhbHVlcyIsInJldCIsInZhbHVlc0FuZENvbnRleHQiLCJpbnB1dFRvT3V0cHV0VmFsdWVzIiwidmFsdWVzIiwidmFsdWUiLCJfYWRkc0NvbXBsZXRlIiwic2V0IiwiaSIsImxlbiIsImxlbmd0aCIsImFkZCIsImZvckVhY2giLCJyZWFkIiwibGlzdGVuIiwic2V0VmFsdWVzIiwiY29udHJvbGxlciIsInN1YiIsInN1YnNjcmliZSIsIm5leHQiLCJjaGFuZ2VzIiwiY2hhbmdlIiwidHlwZSIsImVuZFZhbHVlIiwibGlzdCIsImdldCIsIkVycm9yIiwicmVtb3ZlIiwidHJhbnNmb3JtZWRWYWx1ZSIsImRlbGV0ZSIsImVycm9yIiwiZXJyIiwiY29tcGxldGUiLCJlbmQiLCJpbml0aWFsVmFsdWVzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7a0JBaUJ3QkEsUzs7QUFmeEI7Ozs7OztBQUVBLElBQU1DLFVBQVU7QUF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dWVzQW5kQ29udGV4dCgpLnZhbHVlcyxcbiAgICBsaXN0ZW4oc2V0VmFsdWVzLCBjb250cm9sbGVyKSB7XG4gICAgICBjb25zdCBzdWIgPSBsaXZlU2V0LnN1YnNjcmliZSh7XG4gICAgICAgIG5leHQoY2hhbmdlcykge1xuICAgICAgICAgIGZvciAobGV0IGk9MCxsZW49Y2hhbmdlcy5sZW5ndGg7IGk8bGVuOyBpKyspIHtcbiAgICAgICAgICAgIGNvbnN0IGNoYW5nZSA9IGNoYW5nZXNbaV07XG4gICAgICAgICAgICBpZiAoY2hhbmdlLnR5cGUgPT09ICdhZGQnKSB7XG4gICAgICAgICAgICAgIGlmICghYWRkc0NvbXBsZXRlKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qge3ZhbHVlfSA9IGNoYW5nZTtcbiAgICAgICAgICAgICAgICBjb25zdCB7b3V0cHV0VmFsdWVzLCBhZGRzQ29tcGxldGU6IF9hZGRzQ29tcGxldGV9ID0gc3RlcCh4Zm9ybSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgIGlucHV0VG9PdXRwdXRWYWx1ZXMuc2V0KHZhbHVlLCBvdXRwdXRWYWx1ZXMpO1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGk9MCxsZW49b3V0cHV0VmFsdWVzLmxlbmd0aDsgaTxsZW47IGkrKykge1xuICAgICAgICAgICAgICAgICAgY29udHJvbGxlci5hZGQob3V0cHV0VmFsdWVzW2ldKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKF9hZGRzQ29tcGxldGUpIHtcbiAgICAgICAgICAgICAgICAgIGFkZHNDb21wbGV0ZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICB4Zm9ybVsnQEB0cmFuc2R1Y2VyL3Jlc3VsdCddKFtdKS5mb3JFYWNoKGVuZFZhbHVlID0+IHtcbiAgICAgICAgICAgICAgICAgICAgY29udHJvbGxlci5hZGQoZW5kVmFsdWUpO1xuICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoYW5nZS50eXBlID09PSAncmVtb3ZlJykge1xuICAgICAgICAgICAgICBjb25zdCB7dmFsdWV9ID0gY2hhbmdlO1xuICAgICAgICAgICAgICBjb25zdCBsaXN0ID0gaW5wdXRUb091dHB1dFZhbHVlcy5nZXQodmFsdWUpO1xuICAgICAgICAgICAgICBpZiAoIWxpc3QpIHRocm93IG5ldyBFcnJvcigndmFsdWUgaGFkIG5vdCBiZWVuIGFkZGVkJyk7XG4gICAgICAgICAgICAgIGxpc3QuZm9yRWFjaCh0cmFuc2Zvcm1lZFZhbHVlID0+IHtcbiAgICAgICAgICAgICAgICBjb250cm9sbGVyLnJlbW92ZSh0cmFuc2Zvcm1lZFZhbHVlKTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIGlucHV0VG9PdXRwdXRWYWx1ZXMuZGVsZXRlKHZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGVycm9yKGVycikge1xuICAgICAgICAgIGNvbnRyb2xsZXIuZXJyb3IoZXJyKTtcbiAgICAgICAgfSxcbiAgICAgICAgY29tcGxldGUoKSB7XG4gICAgICAgICAgY29udHJvbGxlci5lbmQoKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIGxldCB7dmFsdWVzOiBpbml0aWFsVmFsdWVzLCBpbnB1dFRvT3V0cHV0VmFsdWVzLCB4Zm9ybSwgYWRkc0NvbXBsZXRlfSA9IHZhbHVlc0FuZENvbnRleHQoKTtcbiAgICAgIHNldFZhbHVlcyhpbml0aWFsVmFsdWVzKTtcblxuICAgICAgcmV0dXJuIHN1YjtcbiAgICB9XG4gIH0pO1xufVxuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy90cmFuc2R1Y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zdWJzY3JpYmUoe1xuICAgICAgICBzdGFydCgpIHtcbiAgICAgICAgICBjb25zdCByZXQgPSB2YWx1ZXNBbmRDb250ZXh0KCk7XG4gICAgICAgICAgaW5pdGlhbFZhbHVlcyA9IHJldC52YWx1ZXM7XG4gICAgICAgICAgaW5wdXRUb091dHB1dFZhbHVlcyA9IHJldC5pbnB1dFRvT3V0cHV0VmFsdWVzO1xuICAgICAgICAgIHhmb3JtID0gcmV0Lnhmb3JtO1xuICAgICAgICAgIGFkZHNDb21wbGV0ZSA9IHJldC5hZGRzQ29tcGxldGU7XG4gICAgICAgIH0sXG4gICAgICAgIG5leHQoY2hhbmdlcykge1xuICAgICAgICAgIGZvciAobGV0IGk9MCxsZW49Y2hhbmdlcy5sZW5ndGg7IGk8bGVuOyBpKyspIHtcbiAgICAgICAgICAgIGNvbnN0IGNoYW5nZSA9IGNoYW5nZXNbaV07XG4gICAgICAgICAgICBpZiAoY2hhbmdlLnR5cGUgPT09ICdhZGQnKSB7XG4gICAgICAgICAgICAgIGlmICghYWRkc0NvbXBsZXRlKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qge3ZhbHVlfSA9IGNoYW5nZTtcbiAgICAgICAgICAgICAgICBjb25zdCB7b3V0cHV0VmFsdWVzLCBhZGRzQ29tcGxldGU6IF9hZGRzQ29tcGxldGV9ID0gc3RlcCh4Zm9ybSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgIGlucHV0VG9PdXRwdXRWYWx1ZXMuc2V0KHZhbHVlLCBvdXRwdXRWYWx1ZXMpO1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGk9MCxsZW49b3V0cHV0VmFsdWVzLmxlbmd0aDsgaTxsZW47IGkrKykge1xuICAgICAgICAgICAgICAgICAgY29udHJvbGxlci5hZGQob3V0cHV0VmFsdWVzW2ldKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKF9hZGRzQ29tcGxldGUpIHtcbiAgICAgICAgICAgICAgICAgIGFkZHNDb21wbGV0ZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICB4Zm9ybVsnQEB0cmFuc2R1Y2VyL3Jlc3VsdCddKFtdKS5mb3JFYWNoKGVuZFZhbHVlID0+IHtcbiAgICAgICAgICAgICAgICAgICAgY29udHJvbGxlci5hZGQoZW5kVmFsdWUpO1xuICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoYW5nZS50eXBlID09PSAncmVtb3ZlJykge1xuICAgICAgICAgICAgICBjb25zdCB7dmFsdWV9ID0gY2hhbmdlO1xuICAgICAgICAgICAgICBjb25zdCBsaXN0ID0gaW5wdXRUb091dHB1dFZhbHVlcy5nZXQodmFsdWUpO1xuICAgICAgICAgICAgICBpZiAoIWxpc3QpIHRocm93IG5ldyBFcnJvcigndmFsdWUgaGFkIG5vdCBiZWVuIGFkZGVkJyk7XG4gICAgICAgICAgICAgIGxpc3QuZm9yRWFjaCh0cmFuc2Zvcm1lZFZhbHVlID0+IHtcbiAgICAgICAgICAgICAgICBjb250cm9sbGVyLnJlbW92ZSh0cmFuc2Zvcm1lZFZhbHVlKTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIGlucHV0VG9PdXRwdXRWYWx1ZXMuZGVsZXRlKHZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGVycm9yKGVycikge1xuICAgICAgICAgIGNvbnRyb2xsZXIuZXJyb3IoZXJyKTtcbiAgICAgICAgfSxcbiAgICAgICAgY29tcGxldGUoKSB7XG4gICAgICAgICAgY29udHJvbGxlci5lbmQoKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIGlmICghaW5pdGlhbFZhbHVlcykgdGhyb3cgbmV3IEVycm9yKCk7XG4gICAgICBzZXRWYWx1ZXMoaW5pdGlhbFZhbHVlcyk7XG5cbiAgICAgIHJldHVybiBzdWI7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ==

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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