Rx.Observable.prototype.sequenceEqual(second, [comparer])
Determins whether two sequences are equal by comparing the elements pairwise using a specified equality comparer.
Arguments
second
(Observable
|Promise
|Array
): Second observable sequence, Promise or array to compare.[comparer]
(Function
): Comparer used to compare elements of both sequences.
Returns
(Observable
): An observable sequence that contains a single element which indicates whether both sequences are of equal length and their corresponding elements are equal according to the specified equality comparer.
Example
var source1 = Rx.Observable.return(42);
var source2 = Rx.Observable.return(42);
var source = source1.sequenceEqual(source2);
var subscription = source.subscribe(
function (x) {
console.log('Next: ' + x);
},
function (err) {
console.log('Error: ' + err);
},
function () {
console.log('Completed');
});
// => Next: true
// => Completed
Location
File:
Dist:
Prerequisites:
NPM Packages:
NuGet Packages:
Unit Tests: