rxjs-rails 2.2.15 → 2.2.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rxjs/rails/version.rb +1 -1
- data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
- data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
- data/vendor/assets/javascripts/rx.async.min.js +1 -1
- data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
- data/vendor/assets/javascripts/rx.binding.min.js +1 -1
- data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
- data/vendor/assets/javascripts/rx.compat.js +186 -184
- data/vendor/assets/javascripts/rx.compat.min.js +2 -2
- data/vendor/assets/javascripts/rx.experimental.js +50 -42
- data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
- data/vendor/assets/javascripts/rx.joinpatterns.min.js +1 -1
- data/vendor/assets/javascripts/rx.js +186 -184
- data/vendor/assets/javascripts/rx.lite.compat.js +186 -184
- data/vendor/assets/javascripts/rx.lite.compat.min.js +2 -2
- data/vendor/assets/javascripts/rx.lite.js +185 -183
- data/vendor/assets/javascripts/rx.lite.min.js +2 -2
- data/vendor/assets/javascripts/rx.min.js +2 -2
- data/vendor/assets/javascripts/rx.testing.min.js +1 -1
- data/vendor/assets/javascripts/rx.time.min.js +1 -1
- data/vendor/assets/javascripts/rx.virtualtime.min.js +1 -1
- metadata +2 -2
@@ -23,26 +23,33 @@
|
|
23
23
|
|
24
24
|
var Rx = { internals: {}, config: {} };
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
26
|
+
// Defaults
|
27
|
+
function noop() { }
|
28
|
+
function identity(x) { return x; }
|
29
|
+
var defaultNow = (function () { return !!Date.now ? Date.now : function () { return +new Date; }; }());
|
30
|
+
function defaultComparer(x, y) { return isEqual(x, y); }
|
31
|
+
function defaultSubComparer(x, y) { return x - y; }
|
32
|
+
function defaultKeySerializer(x) { return x.toString(); }
|
33
|
+
function defaultError(err) { throw err; }
|
34
|
+
function isPromise(p) { return typeof p.then === 'function' && typeof p.subscribe === 'undefined'; }
|
35
|
+
|
36
|
+
// Errors
|
37
|
+
var sequenceContainsNoElements = 'Sequence contains no elements.';
|
38
|
+
var argumentOutOfRange = 'Argument out of range';
|
39
|
+
var objectDisposed = 'Object has been disposed';
|
40
|
+
function checkDisposed() { if (this.isDisposed) { throw new Error(objectDisposed); } }
|
41
|
+
|
42
|
+
// Shim in iterator support
|
43
|
+
var $iterator$ = (typeof Symbol === 'object' && Symbol.iterator) ||
|
44
|
+
'_es6shim_iterator_';
|
45
|
+
// Firefox ships a partial implementation using the name @@iterator.
|
46
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=907077#c14
|
47
|
+
// So use that name if we detect it.
|
48
|
+
if (root.Set && typeof new root.Set()['@@iterator'] === 'function') {
|
49
|
+
$iterator$ = '@@iterator';
|
50
|
+
}
|
51
|
+
var doneEnumerator = { done: true, value: undefined };
|
52
|
+
|
46
53
|
/** `Object#toString` result shortcuts */
|
47
54
|
var argsClass = '[object Arguments]',
|
48
55
|
arrayClass = '[object Array]',
|
@@ -1519,155 +1526,143 @@
|
|
1519
1526
|
};
|
1520
1527
|
}());
|
1521
1528
|
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
*/
|
1526
|
-
var Enumerator = Rx.internals.Enumerator = function (moveNext, getCurrent) {
|
1527
|
-
this.moveNext = moveNext;
|
1528
|
-
this.getCurrent = getCurrent;
|
1529
|
-
};
|
1529
|
+
var Enumerator = Rx.internals.Enumerator = function (next) {
|
1530
|
+
this._next = next;
|
1531
|
+
};
|
1530
1532
|
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
* @private
|
1535
|
-
*/
|
1536
|
-
var enumeratorCreate = Enumerator.create = function (moveNext, getCurrent) {
|
1537
|
-
var done = false;
|
1538
|
-
return new Enumerator(function () {
|
1539
|
-
if (done) {
|
1540
|
-
return false;
|
1541
|
-
}
|
1542
|
-
var result = moveNext();
|
1543
|
-
if (!result) {
|
1544
|
-
done = true;
|
1545
|
-
}
|
1546
|
-
return result;
|
1547
|
-
}, function () { return getCurrent(); });
|
1548
|
-
};
|
1549
|
-
|
1550
|
-
var Enumerable = Rx.internals.Enumerable = function (getEnumerator) {
|
1551
|
-
this.getEnumerator = getEnumerator;
|
1552
|
-
};
|
1533
|
+
Enumerator.prototype.next = function () {
|
1534
|
+
return this._next();
|
1535
|
+
};
|
1553
1536
|
|
1554
|
-
|
1555
|
-
var sources = this;
|
1556
|
-
return new AnonymousObservable(function (observer) {
|
1557
|
-
var e = sources.getEnumerator(), isDisposed, subscription = new SerialDisposable();
|
1558
|
-
var cancelable = immediateScheduler.scheduleRecursive(function (self) {
|
1559
|
-
var current, hasNext;
|
1560
|
-
if (isDisposed) { return; }
|
1537
|
+
Enumerator.prototype[$iterator$] = function () { return this; }
|
1561
1538
|
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
current = e.getCurrent();
|
1566
|
-
}
|
1567
|
-
} catch (ex) {
|
1568
|
-
observer.onError(ex);
|
1569
|
-
return;
|
1570
|
-
}
|
1539
|
+
var Enumerable = Rx.internals.Enumerable = function (iterator) {
|
1540
|
+
this._iterator = iterator;
|
1541
|
+
};
|
1571
1542
|
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1575
|
-
}
|
1543
|
+
Enumerable.prototype[$iterator$] = function () {
|
1544
|
+
return this._iterator();
|
1545
|
+
};
|
1576
1546
|
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
}));
|
1588
|
-
});
|
1589
|
-
};
|
1547
|
+
Enumerable.prototype.concat = function () {
|
1548
|
+
var sources = this;
|
1549
|
+
return new AnonymousObservable(function (observer) {
|
1550
|
+
var e;
|
1551
|
+
try {
|
1552
|
+
e = sources[$iterator$]();
|
1553
|
+
} catch(err) {
|
1554
|
+
observer.onError();
|
1555
|
+
return;
|
1556
|
+
}
|
1590
1557
|
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
var cancelable = immediateScheduler.scheduleRecursive(function (self) {
|
1597
|
-
var current, hasNext;
|
1598
|
-
if (isDisposed) { return; }
|
1558
|
+
var isDisposed,
|
1559
|
+
subscription = new SerialDisposable();
|
1560
|
+
var cancelable = immediateScheduler.scheduleRecursive(function (self) {
|
1561
|
+
var currentItem;
|
1562
|
+
if (isDisposed) { return; }
|
1599
1563
|
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
observer.onError(ex);
|
1607
|
-
return;
|
1608
|
-
}
|
1564
|
+
try {
|
1565
|
+
currentItem = e.next();
|
1566
|
+
} catch (ex) {
|
1567
|
+
observer.onError(ex);
|
1568
|
+
return;
|
1569
|
+
}
|
1609
1570
|
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
observer.onCompleted();
|
1615
|
-
}
|
1616
|
-
return;
|
1617
|
-
}
|
1571
|
+
if (currentItem.done) {
|
1572
|
+
observer.onCompleted();
|
1573
|
+
return;
|
1574
|
+
}
|
1618
1575
|
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
},
|
1627
|
-
observer.onCompleted.bind(observer)));
|
1628
|
-
});
|
1629
|
-
return new CompositeDisposable(subscription, cancelable, disposableCreate(function () {
|
1630
|
-
isDisposed = true;
|
1631
|
-
}));
|
1576
|
+
var d = new SingleAssignmentDisposable();
|
1577
|
+
subscription.setDisposable(d);
|
1578
|
+
d.setDisposable(currentItem.value.subscribe(
|
1579
|
+
observer.onNext.bind(observer),
|
1580
|
+
observer.onError.bind(observer),
|
1581
|
+
function () { self(); })
|
1582
|
+
);
|
1632
1583
|
});
|
1633
|
-
};
|
1634
1584
|
|
1585
|
+
return new CompositeDisposable(subscription, cancelable, disposableCreate(function () {
|
1586
|
+
isDisposed = true;
|
1587
|
+
}));
|
1588
|
+
});
|
1589
|
+
};
|
1635
1590
|
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1591
|
+
Enumerable.prototype.catchException = function () {
|
1592
|
+
var sources = this;
|
1593
|
+
return new AnonymousObservable(function (observer) {
|
1594
|
+
var e;
|
1595
|
+
try {
|
1596
|
+
e = sources[$iterator$]();
|
1597
|
+
} catch(err) {
|
1598
|
+
observer.onError();
|
1599
|
+
return;
|
1600
|
+
}
|
1601
|
+
|
1602
|
+
var isDisposed,
|
1603
|
+
lastException,
|
1604
|
+
subscription = new SerialDisposable();
|
1605
|
+
var cancelable = immediateScheduler.scheduleRecursive(function (self) {
|
1606
|
+
if (isDisposed) { return; }
|
1607
|
+
|
1608
|
+
var currentItem;
|
1609
|
+
try {
|
1610
|
+
currentItem = e.next();
|
1611
|
+
} catch (ex) {
|
1612
|
+
observer.onError(ex);
|
1613
|
+
return;
|
1639
1614
|
}
|
1640
|
-
return new Enumerable(function () {
|
1641
|
-
var current, left = repeatCount;
|
1642
|
-
return enumeratorCreate(function () {
|
1643
|
-
if (left === 0) {
|
1644
|
-
return false;
|
1645
|
-
}
|
1646
|
-
if (left > 0) {
|
1647
|
-
left--;
|
1648
|
-
}
|
1649
|
-
current = value;
|
1650
|
-
return true;
|
1651
|
-
}, function () { return current; });
|
1652
|
-
});
|
1653
|
-
};
|
1654
1615
|
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1616
|
+
if (currentItem.done) {
|
1617
|
+
if (lastException) {
|
1618
|
+
observer.onError(lastException);
|
1619
|
+
} else {
|
1620
|
+
observer.onCompleted();
|
1621
|
+
}
|
1622
|
+
return;
|
1623
|
+
}
|
1624
|
+
|
1625
|
+
var d = new SingleAssignmentDisposable();
|
1626
|
+
subscription.setDisposable(d);
|
1627
|
+
d.setDisposable(currentItem.value.subscribe(
|
1628
|
+
observer.onNext.bind(observer),
|
1629
|
+
function (exn) {
|
1630
|
+
lastException = exn;
|
1631
|
+
self();
|
1632
|
+
},
|
1633
|
+
observer.onCompleted.bind(observer)));
|
1634
|
+
});
|
1635
|
+
return new CompositeDisposable(subscription, cancelable, disposableCreate(function () {
|
1636
|
+
isDisposed = true;
|
1637
|
+
}));
|
1638
|
+
});
|
1639
|
+
};
|
1640
|
+
|
1641
|
+
|
1642
|
+
var enumerableRepeat = Enumerable.repeat = function (value, repeatCount) {
|
1643
|
+
if (repeatCount == null) { repeatCount = -1; }
|
1644
|
+
return new Enumerable(function () {
|
1645
|
+
var left = repeatCount;
|
1646
|
+
return new Enumerator(function () {
|
1647
|
+
if (left === 0) { return doneEnumerator; }
|
1648
|
+
if (left > 0) { left--; }
|
1649
|
+
return { done: false, value: value };
|
1650
|
+
});
|
1651
|
+
});
|
1652
|
+
};
|
1653
|
+
|
1654
|
+
var enumerableFor = Enumerable.forEach = function (source, selector, thisArg) {
|
1655
|
+
selector || (selector = identity);
|
1656
|
+
return new Enumerable(function () {
|
1657
|
+
var index = -1;
|
1658
|
+
return new Enumerator(
|
1659
|
+
function () {
|
1660
|
+
return ++index < source.length ?
|
1661
|
+
{ done: false, value: selector.call(thisArg, source[index], index, source) } :
|
1662
|
+
doneEnumerator;
|
1669
1663
|
});
|
1670
|
-
};
|
1664
|
+
});
|
1665
|
+
};
|
1671
1666
|
|
1672
1667
|
/**
|
1673
1668
|
* Supports push-style iteration over an observable sequence.
|
@@ -2072,37 +2067,44 @@
|
|
2072
2067
|
});
|
2073
2068
|
};
|
2074
2069
|
|
2075
|
-
|
2076
|
-
|
2077
|
-
|
2078
|
-
|
2079
|
-
|
2080
|
-
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2084
|
-
|
2085
|
-
|
2086
|
-
|
2087
|
-
|
2088
|
-
|
2089
|
-
|
2090
|
-
|
2091
|
-
|
2092
|
-
|
2093
|
-
|
2070
|
+
/**
|
2071
|
+
* Converts an iterable into an Observable sequence
|
2072
|
+
*
|
2073
|
+
* @example
|
2074
|
+
* var res = Rx.Observable.fromIterable(new Map());
|
2075
|
+
* var res = Rx.Observable.fromIterable(new Set(), Rx.Scheduler.timeout);
|
2076
|
+
* @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on.
|
2077
|
+
* @returns {Observable} The observable sequence whose elements are pulled from the given generator sequence.
|
2078
|
+
*/
|
2079
|
+
Observable.fromIterable = function (iterable, scheduler) {
|
2080
|
+
scheduler || (scheduler = currentThreadScheduler);
|
2081
|
+
return new AnonymousObservable(function (observer) {
|
2082
|
+
var iterator;
|
2083
|
+
try {
|
2084
|
+
iterator = iterable[$iterator$]();
|
2085
|
+
} catch (e) {
|
2086
|
+
observer.onError(e);
|
2087
|
+
return;
|
2088
|
+
}
|
2094
2089
|
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2090
|
+
return scheduler.scheduleRecursive(function (self) {
|
2091
|
+
var next;
|
2092
|
+
try {
|
2093
|
+
next = iterator.next();
|
2094
|
+
} catch (err) {
|
2095
|
+
observer.onError(err);
|
2096
|
+
return;
|
2097
|
+
}
|
2098
|
+
|
2099
|
+
if (next.done) {
|
2100
|
+
observer.onCompleted();
|
2101
|
+
} else {
|
2102
|
+
observer.onNext(next.value);
|
2103
|
+
self();
|
2104
|
+
}
|
2105
|
+
});
|
2106
|
+
});
|
2107
|
+
};
|
2106
2108
|
|
2107
2109
|
/**
|
2108
2110
|
* Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages.
|