Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 2.31 KB

sequenceequal.md

File metadata and controls

56 lines (42 loc) · 2.31 KB

Rx.Observable.prototype.sequenceEqual(second, [comparer])

Determins whether two sequences are equal by comparing the elements pairwise using a specified equality comparer.

Arguments

  1. second (Observable | Promise | Array): Second observable sequence, Promise or array to compare.
  2. [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: