Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Latest commit

 

History

History
57 lines (43 loc) · 2.39 KB

sequenceequal.md

File metadata and controls

57 lines (43 loc) · 2.39 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: