From 3910ae7c9c1364b9ec22564796125c3285ebf031 Mon Sep 17 00:00:00 2001 From: Phil Cockfield Date: Wed, 28 Feb 2024 18:50:19 +1300 Subject: [PATCH] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1fbae59..b9837db 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Establish a data connection as per [peerjs](https://github.com/peers/peerjs#data ```ts import { Peer } from "peerjs"; +const peer = new Peer("pick-an-id"); const conn = peer.connect("another-peers-id"); ``` @@ -30,7 +31,7 @@ import { PeerjsNetworkAdapter } from 'automerge-repo-network-peerjs'; const adapter = new PeerjsNetworkAdapter(conn); ``` -Along with the usual `NetworkAdapterInterface` events an additional `onData` event is available to +Along with the usual `NetworkAdapterInterface` events an additional `onData` event is available to keep track of directional data being sent and received, for example: ```ts