webpeerjs 0.0.3 → 0.0.5

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.
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
 
4
4
  WebpeerJS enables browser to browser connectivity without a central server.
5
5
 
6
+ [Demo](https://nuzulul.github.io/webpeerjs/demo/)
7
+
6
8
  ## Example
7
9
 
8
10
  ```
@@ -16,14 +18,13 @@ void async function main() {
16
18
 
17
19
  const [send,listen,members] = node.joinRoom('myroom')
18
20
 
19
- send('hello')
20
-
21
21
  listen((message,id) => {
22
22
  console.log(`Message from ${id} : ${message}`)
23
23
  })
24
24
 
25
25
  members((data) => {
26
26
  console.log(`Members : ${data}`)
27
+ send('hello')
27
28
  })
28
29
 
29
30
  }()
@@ -31,10 +32,18 @@ void async function main() {
31
32
 
32
33
  ## Install
33
34
 
35
+ NPM :
36
+
34
37
  ```
35
38
  npm i webpeerjs
36
39
  ```
37
40
 
41
+ CDN :
42
+
43
+ ```
44
+ <script src="https://cdn.jsdelivr.net/npm/webpeerjs@0.0/dist/umd/webpeerjs.min.js"></script>
45
+ ```
46
+
38
47
  ## API
39
48
 
40
49
  - `createWebpeer()` Create a new local node.