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,25 +23,32 @@
|
|
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
|
-
|
26
|
+
// Defaults
|
27
|
+
function noop() { }
|
28
|
+
function identity(x) { return x; }
|
29
|
+
var defaultNow = Date.now;
|
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 };
|
45
52
|
|
46
53
|
/** `Object#toString` result shortcuts */
|
47
54
|
var argsClass = '[object Arguments]',
|
@@ -1401,155 +1408,143 @@
|
|
1401
1408
|
};
|
1402
1409
|
}());
|
1403
1410
|
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
*/
|
1408
|
-
var Enumerator = Rx.internals.Enumerator = function (moveNext, getCurrent) {
|
1409
|
-
this.moveNext = moveNext;
|
1410
|
-
this.getCurrent = getCurrent;
|
1411
|
-
};
|
1411
|
+
var Enumerator = Rx.internals.Enumerator = function (next) {
|
1412
|
+
this._next = next;
|
1413
|
+
};
|
1412
1414
|
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
* @private
|
1417
|
-
*/
|
1418
|
-
var enumeratorCreate = Enumerator.create = function (moveNext, getCurrent) {
|
1419
|
-
var done = false;
|
1420
|
-
return new Enumerator(function () {
|
1421
|
-
if (done) {
|
1422
|
-
return false;
|
1423
|
-
}
|
1424
|
-
var result = moveNext();
|
1425
|
-
if (!result) {
|
1426
|
-
done = true;
|
1427
|
-
}
|
1428
|
-
return result;
|
1429
|
-
}, function () { return getCurrent(); });
|
1430
|
-
};
|
1431
|
-
|
1432
|
-
var Enumerable = Rx.internals.Enumerable = function (getEnumerator) {
|
1433
|
-
this.getEnumerator = getEnumerator;
|
1434
|
-
};
|
1415
|
+
Enumerator.prototype.next = function () {
|
1416
|
+
return this._next();
|
1417
|
+
};
|
1435
1418
|
|
1436
|
-
|
1437
|
-
var sources = this;
|
1438
|
-
return new AnonymousObservable(function (observer) {
|
1439
|
-
var e = sources.getEnumerator(), isDisposed, subscription = new SerialDisposable();
|
1440
|
-
var cancelable = immediateScheduler.scheduleRecursive(function (self) {
|
1441
|
-
var current, hasNext;
|
1442
|
-
if (isDisposed) { return; }
|
1419
|
+
Enumerator.prototype[$iterator$] = function () { return this; }
|
1443
1420
|
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
current = e.getCurrent();
|
1448
|
-
}
|
1449
|
-
} catch (ex) {
|
1450
|
-
observer.onError(ex);
|
1451
|
-
return;
|
1452
|
-
}
|
1421
|
+
var Enumerable = Rx.internals.Enumerable = function (iterator) {
|
1422
|
+
this._iterator = iterator;
|
1423
|
+
};
|
1453
1424
|
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
}
|
1425
|
+
Enumerable.prototype[$iterator$] = function () {
|
1426
|
+
return this._iterator();
|
1427
|
+
};
|
1458
1428
|
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
}));
|
1470
|
-
});
|
1471
|
-
};
|
1429
|
+
Enumerable.prototype.concat = function () {
|
1430
|
+
var sources = this;
|
1431
|
+
return new AnonymousObservable(function (observer) {
|
1432
|
+
var e;
|
1433
|
+
try {
|
1434
|
+
e = sources[$iterator$]();
|
1435
|
+
} catch(err) {
|
1436
|
+
observer.onError();
|
1437
|
+
return;
|
1438
|
+
}
|
1472
1439
|
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
var cancelable = immediateScheduler.scheduleRecursive(function (self) {
|
1479
|
-
var current, hasNext;
|
1480
|
-
if (isDisposed) { return; }
|
1440
|
+
var isDisposed,
|
1441
|
+
subscription = new SerialDisposable();
|
1442
|
+
var cancelable = immediateScheduler.scheduleRecursive(function (self) {
|
1443
|
+
var currentItem;
|
1444
|
+
if (isDisposed) { return; }
|
1481
1445
|
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
observer.onError(ex);
|
1489
|
-
return;
|
1490
|
-
}
|
1446
|
+
try {
|
1447
|
+
currentItem = e.next();
|
1448
|
+
} catch (ex) {
|
1449
|
+
observer.onError(ex);
|
1450
|
+
return;
|
1451
|
+
}
|
1491
1452
|
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
observer.onCompleted();
|
1497
|
-
}
|
1498
|
-
return;
|
1499
|
-
}
|
1453
|
+
if (currentItem.done) {
|
1454
|
+
observer.onCompleted();
|
1455
|
+
return;
|
1456
|
+
}
|
1500
1457
|
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
},
|
1509
|
-
observer.onCompleted.bind(observer)));
|
1510
|
-
});
|
1511
|
-
return new CompositeDisposable(subscription, cancelable, disposableCreate(function () {
|
1512
|
-
isDisposed = true;
|
1513
|
-
}));
|
1458
|
+
var d = new SingleAssignmentDisposable();
|
1459
|
+
subscription.setDisposable(d);
|
1460
|
+
d.setDisposable(currentItem.value.subscribe(
|
1461
|
+
observer.onNext.bind(observer),
|
1462
|
+
observer.onError.bind(observer),
|
1463
|
+
function () { self(); })
|
1464
|
+
);
|
1514
1465
|
});
|
1515
|
-
};
|
1516
1466
|
|
1467
|
+
return new CompositeDisposable(subscription, cancelable, disposableCreate(function () {
|
1468
|
+
isDisposed = true;
|
1469
|
+
}));
|
1470
|
+
});
|
1471
|
+
};
|
1472
|
+
|
1473
|
+
Enumerable.prototype.catchException = function () {
|
1474
|
+
var sources = this;
|
1475
|
+
return new AnonymousObservable(function (observer) {
|
1476
|
+
var e;
|
1477
|
+
try {
|
1478
|
+
e = sources[$iterator$]();
|
1479
|
+
} catch(err) {
|
1480
|
+
observer.onError();
|
1481
|
+
return;
|
1482
|
+
}
|
1517
1483
|
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1484
|
+
var isDisposed,
|
1485
|
+
lastException,
|
1486
|
+
subscription = new SerialDisposable();
|
1487
|
+
var cancelable = immediateScheduler.scheduleRecursive(function (self) {
|
1488
|
+
if (isDisposed) { return; }
|
1489
|
+
|
1490
|
+
var currentItem;
|
1491
|
+
try {
|
1492
|
+
currentItem = e.next();
|
1493
|
+
} catch (ex) {
|
1494
|
+
observer.onError(ex);
|
1495
|
+
return;
|
1521
1496
|
}
|
1522
|
-
return new Enumerable(function () {
|
1523
|
-
var current, left = repeatCount;
|
1524
|
-
return enumeratorCreate(function () {
|
1525
|
-
if (left === 0) {
|
1526
|
-
return false;
|
1527
|
-
}
|
1528
|
-
if (left > 0) {
|
1529
|
-
left--;
|
1530
|
-
}
|
1531
|
-
current = value;
|
1532
|
-
return true;
|
1533
|
-
}, function () { return current; });
|
1534
|
-
});
|
1535
|
-
};
|
1536
1497
|
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1498
|
+
if (currentItem.done) {
|
1499
|
+
if (lastException) {
|
1500
|
+
observer.onError(lastException);
|
1501
|
+
} else {
|
1502
|
+
observer.onCompleted();
|
1503
|
+
}
|
1504
|
+
return;
|
1505
|
+
}
|
1506
|
+
|
1507
|
+
var d = new SingleAssignmentDisposable();
|
1508
|
+
subscription.setDisposable(d);
|
1509
|
+
d.setDisposable(currentItem.value.subscribe(
|
1510
|
+
observer.onNext.bind(observer),
|
1511
|
+
function (exn) {
|
1512
|
+
lastException = exn;
|
1513
|
+
self();
|
1514
|
+
},
|
1515
|
+
observer.onCompleted.bind(observer)));
|
1516
|
+
});
|
1517
|
+
return new CompositeDisposable(subscription, cancelable, disposableCreate(function () {
|
1518
|
+
isDisposed = true;
|
1519
|
+
}));
|
1520
|
+
});
|
1521
|
+
};
|
1522
|
+
|
1523
|
+
|
1524
|
+
var enumerableRepeat = Enumerable.repeat = function (value, repeatCount) {
|
1525
|
+
if (repeatCount == null) { repeatCount = -1; }
|
1526
|
+
return new Enumerable(function () {
|
1527
|
+
var left = repeatCount;
|
1528
|
+
return new Enumerator(function () {
|
1529
|
+
if (left === 0) { return doneEnumerator; }
|
1530
|
+
if (left > 0) { left--; }
|
1531
|
+
return { done: false, value: value };
|
1532
|
+
});
|
1533
|
+
});
|
1534
|
+
};
|
1535
|
+
|
1536
|
+
var enumerableFor = Enumerable.forEach = function (source, selector, thisArg) {
|
1537
|
+
selector || (selector = identity);
|
1538
|
+
return new Enumerable(function () {
|
1539
|
+
var index = -1;
|
1540
|
+
return new Enumerator(
|
1541
|
+
function () {
|
1542
|
+
return ++index < source.length ?
|
1543
|
+
{ done: false, value: selector.call(thisArg, source[index], index, source) } :
|
1544
|
+
doneEnumerator;
|
1551
1545
|
});
|
1552
|
-
};
|
1546
|
+
});
|
1547
|
+
};
|
1553
1548
|
|
1554
1549
|
/**
|
1555
1550
|
* Supports push-style iteration over an observable sequence.
|
@@ -1954,37 +1949,44 @@
|
|
1954
1949
|
});
|
1955
1950
|
};
|
1956
1951
|
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
|
1969
|
-
|
1970
|
-
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
1975
|
-
|
1952
|
+
/**
|
1953
|
+
* Converts an iterable into an Observable sequence
|
1954
|
+
*
|
1955
|
+
* @example
|
1956
|
+
* var res = Rx.Observable.fromIterable(new Map());
|
1957
|
+
* var res = Rx.Observable.fromIterable(new Set(), Rx.Scheduler.timeout);
|
1958
|
+
* @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on.
|
1959
|
+
* @returns {Observable} The observable sequence whose elements are pulled from the given generator sequence.
|
1960
|
+
*/
|
1961
|
+
Observable.fromIterable = function (iterable, scheduler) {
|
1962
|
+
scheduler || (scheduler = currentThreadScheduler);
|
1963
|
+
return new AnonymousObservable(function (observer) {
|
1964
|
+
var iterator;
|
1965
|
+
try {
|
1966
|
+
iterator = iterable[$iterator$]();
|
1967
|
+
} catch (e) {
|
1968
|
+
observer.onError(e);
|
1969
|
+
return;
|
1970
|
+
}
|
1976
1971
|
|
1977
|
-
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
|
1983
|
-
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
|
1972
|
+
return scheduler.scheduleRecursive(function (self) {
|
1973
|
+
var next;
|
1974
|
+
try {
|
1975
|
+
next = iterator.next();
|
1976
|
+
} catch (err) {
|
1977
|
+
observer.onError(err);
|
1978
|
+
return;
|
1979
|
+
}
|
1980
|
+
|
1981
|
+
if (next.done) {
|
1982
|
+
observer.onCompleted();
|
1983
|
+
} else {
|
1984
|
+
observer.onNext(next.value);
|
1985
|
+
self();
|
1986
|
+
}
|
1987
|
+
});
|
1988
|
+
});
|
1989
|
+
};
|
1988
1990
|
|
1989
1991
|
/**
|
1990
1992
|
* Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages.
|