From c2f7ae1d9e27512dffde8be1198d86be7d272d44 Mon Sep 17 00:00:00 2001 From: jsdevtom Date: Mon, 5 Aug 2019 18:46:23 +0200 Subject: [PATCH] docs: tldr the readme --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 491c5d5..11ba552 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,24 @@ # Distinct Until Changed Immutable +### tl;dr + +Install: + +`npm i -S distinct-until-changed-immutable` + +then import: + +`import { distinctUntilChangedImmutable } from 'distinct-until-changed-immutable';` + +then use: + +```javascript +of({a: 'a'}, {b: 'b'}, {b: 'b'}) + .pipe( + distinctUntilChangedImmutable(), + ) +``` +___ Returns an Observable that emits all items emitted by the source Observable that are deeply 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. @@ -21,7 +40,7 @@ Returns an Observable that emits all items emitted by the source Observable that An example using a compare function ```javascript import { of } from 'rxjs'; - import { distinctUntilChangedImmutable } from 'rxjs/operators'; + import { distinctUntilChangedImmutable } from 'distinct-until-changed-immutable'; interface Person { age: number,