summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortheia2022-07-31 13:44:13 -0400
committertheia2022-07-31 13:44:13 -0400
commitca9f2cf1cdd49e685e08997a4e43c78975ed8cf7 (patch)
tree7c0244cfa938adb598d679fd8f04dc18a3d52264
parent0218c723ffb7b1c7a52acc8d0fa4d0702fd56ec5 (diff)
typos in readme
-rw-r--r--README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index 7a61e7a..4ac0a73 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
This is the base Javascript library that interfaces with the [Graffiti server](https://github.com/csail-graffiti/server).
We recommend not using the vanilla library itself but instead using framework plugins built on top of this library like the [Graffiti plugin for Vue.JS](https://github.com/csail-graffiti/graffiti-js-vue).
-With this library:
+Example usage:
```javascript
import GraffitiSocket from "https://csail-graffiti.github.io/graffiti-js-vanilla/socket.js"
@@ -18,9 +18,9 @@ const queryID = await gs.subscribe({
content: { $type: 'string' }
}
// With an arbitrary update callback
- (obj) => console.log(`An object has been created: {obj}`)
+ (obj) => console.log(`An object has been created: {obj}`),
// and delete callback
- (obj) => console.log(`An object with id {obj._id} by user {obj._by} has been deleted`.
+ (obj) => console.log(`An object with id {obj._id} by user {obj._by} has been deleted`.)
)
// And then unsubscribe to those queries
@@ -30,10 +30,10 @@ await gs.unsubscribe(queryID)
gs.logIn()
gs.logOut()
if (gs.loggedIn) {
- ...
+ // ...
}
-// When you are logged in you reference your user ID
+// When you are logged in you can reference your user ID
console.log(gs.myID)
// And when you are logged in you can