Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
sample code: simplify observable subscription
  • Loading branch information
philcockfield authored Feb 28, 2024
1 parent 74236f3 commit 25282be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ to keep track of directional data being sent and received, for example:
```ts
function monitor(adapter: PeerjsNetworkAdapter, dispose$?: Observable) {
const detach = adapter.onData((e) => console.log(`⚡️ ${e.direction}: ${e.bytes} bytes`));
dispose$?.subscribe(() => detach());
dispose$?.subscribe((detach);
}

```
Expand Down

0 comments on commit 25282be

Please sign in to comment.