Skip to content

Commit

Permalink
docs: tldr the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdevtom committed Aug 5, 2019
1 parent cdeb6db commit c2f7ae1
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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,
Expand Down

0 comments on commit c2f7ae1

Please sign in to comment.