Skip to content

Commit

Permalink
docs(operator): Fitting description of distinctUntilChanged and disti…
Browse files Browse the repository at this point in the history
…nctUntilKeyChanged (#4663) (#4686)

* docs(operator): add missing marble diagramms

* docs(operator): add fitting description and diagramm to distinctUntilKeyChanged

* docs(operator): add marbel diagramm to distinctUntilChanged

* Revert "docs(operator): add marbel diagramm to distinctUntilChanged"

This reverts commit 6bf3aae.

* Revert "docs(operator): add fitting description and diagramm to distinctUntilKeyChanged"

This reverts commit 98c23b5.

* Revert "docs(operator): add missing marble diagramms"

This reverts commit b61acad.

* docs(operator): add missing marble diagramms

* docs(operator): add fitting description and diagramm

* docs(operator): add informal and diagramm

* docs(operator): deleted duplicated line
  • Loading branch information
Daschyppoo authored and benlesh committed Apr 23, 2019
1 parent bb1bac7 commit ae04794
Show file tree
Hide file tree
Showing 19 changed files with 11 additions and 3 deletions.
Binary file added docs_app/assets/images/marble-diagrams/NEVER.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs_app/assets/images/marble-diagrams/buffer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs_app/assets/images/marble-diagrams/create.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs_app/assets/images/marble-diagrams/every.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs_app/assets/images/marble-diagrams/pairs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs_app/assets/images/marble-diagrams/tap.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/internal/operators/distinctUntilChanged.ts
Expand Up @@ -11,8 +11,11 @@ export function distinctUntilChanged<T, K>(compare: (x: K, y: K) => boolean, key
/**
* Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item.
*
* If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.
* <span class="informal">It's like {@link filter}, but just emits the values that are distinct from the previous.</span>
*
* ![](distinctUntilChanged.png)
*
* If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.
* If a comparator function is not provided, an equality check is used by default.
*
* ## Example
Expand Down
9 changes: 7 additions & 2 deletions src/internal/operators/distinctUntilKeyChanged.ts
Expand Up @@ -10,9 +10,14 @@ export function distinctUntilKeyChanged<T, K extends keyof T>(key: K, compare: (
* Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item,
* using a property accessed by using the key provided to check if the two items are distinct.
*
* If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.
* <span class="informal">It's like {@link distinctUntilChanged}, but the distinct comparison uses a key to access a property.</span>
*
* If a comparator function is not provided, an equality check is used by default.
* ![](distinctUntilKeyChanged.png)
*
* `distinctUntilKeyChanged` emits all items of the source Observable, wich are distinct by comparison.
* The comparison checks if the previous item is distinct from the current item, using a `key` to access a property.
* If a comparator function is provided, then it will be called for each item with the property key
* to test for whether or not that value should be emitted.
*
* ## Examples
* An example comparing the name of persons
Expand Down

0 comments on commit ae04794

Please sign in to comment.