Skip to content

Commit

Permalink
biome fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunter275 committed Jun 30, 2024
1 parent 8c9e2ef commit 697666e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
18 changes: 9 additions & 9 deletions example/example.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import { HttpConnection } from "./dist"
import { HttpConnection } from "./dist";

const Connect = async () => {
console.log("Running...");
const connection = new HttpConnection()
const connection = new HttpConnection();
await connection.connect({
address: "meshtastic.local",
fetchInterval: 2000,
tls: false,
});

connection.events.onMessagePacket.subscribe((packet) => {
onMessage(packet.from, packet.data)
})
onMessage(packet.from, packet.data);
});

connection.events.onPrivatePacket.subscribe((packet) => {
onMessage(packet.from, packet.data)
})
}
onMessage(packet.from, packet.data);
});
};

const onMessage = (sender, message) => {
console.log("Message from: " + sender);
console.log("Message was: " + String(message));
}
};

Connect();
Connect();
5 changes: 2 additions & 3 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
"author": "",
"license": "ISC",
"type": "module",
"dependencies": {
},
"dependencies": {},
"devDependencies": {
"tsx": "^4.16.0"
},
"engines": {"node": ">=19.0.0"}
"engines": { "node": ">=19.0.0" }
}

0 comments on commit 697666e

Please sign in to comment.