Skip to content

Commit

Permalink
docs(sequenceEqual): add marble diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
benlesh committed Aug 16, 2016
1 parent f484a88 commit 9796456
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spec/operators/sequenceEqual-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const booleans = { T: true, F: false };

/** @test {sequenceEqual} */
describe('Observable.prototype.sequenceEqual', () => {
it('should return true for two equal sequences', () => {
asDiagram('sequenceEqual(observable)')('should return true for two equal sequences', () => {
const s1 = hot('--a--^--b--c--d--e--f--g--|');
const s1subs = '^ !';
const s2 = hot('-----^-----b--c--d-e-f------g-|');
Expand Down
2 changes: 2 additions & 0 deletions src/operator/sequenceEqual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export interface SequenceEqualSignature<T> {
*
* <span class="informal">Checks to see of all values emitted by both observables are equal, in order.</span>
*
* <img src="./img/sequenceEqual.png" width="100%">
*
* `sequenceEqual` subscribes to two observables and buffers incoming values from each observable. Whenever either
* observable emits a value, the value is buffered and the buffers are shifted and compared from the bottom
* up; If any value pair doesn't match, the returned observable will emit `false` and complete. If one of the
Expand Down

0 comments on commit 9796456

Please sign in to comment.