sonic-ws 1.0.0-beta.3 → 1.0.0-beta.3-clean

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -3
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -12,12 +12,17 @@ While still simple and efficient, SonicWS provides efficient packet transfers.
12
12
 
13
13
  ## SAMPLES
14
14
 
15
- Importing:
15
+ ### Importing:
16
+ Node (Client & Server):
16
17
  ```js
17
18
  import { PacketType, SonicWS, SonicWSServer, CreatePacket } from "sonic-ws";
18
19
  ```
20
+ Browser (Client):
21
+ ```html
22
+ <script src="https://raw.githubusercontent.com/cutelittlelily/sonic-ws/refs/heads/main/bundled/SonicWS_bundle.js"></script>
23
+ ```
19
24
 
20
- Server:
25
+ ### Server:
21
26
  ```js
22
27
  const wss = new SonicWSServer(
23
28
  [CreatePacket("pong", PacketType.INTS_D, 1)], // client-sent packets
@@ -44,7 +49,7 @@ wss.on_ready(() => {
44
49
  });
45
50
  ```
46
51
 
47
- Client:
52
+ ### Client:
48
53
  ```js
49
54
  const ws = new SonicWS("ws://localhost:1234");
50
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sonic-ws",
3
- "version": "1.0.0-beta.3",
3
+ "version": "1.0.0-beta.3-clean",
4
4
  "description": "A bandwidth efficient websocket library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  "build": "npm run build_node && npm run build_web",
12
12
 
13
13
  "test_web": "npm run build && node test-site/server.mjs",
14
- "test_node": "npm run build_node && node test.mjs"
14
+ "test_node": "npm run build && node test.mjs"
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",