iosignal 2.1.0 → 2.2.0
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 +10 -10
- package/dist/{iosignal.js → io.js} +4 -4
- package/dist/io.js.map +1 -0
- package/dist/{iosignal.min.js → io.min.js} +4 -4
- package/dist/io.min.js.map +1 -0
- package/dist/iosignal.cjs +3 -3
- package/dist/iosignal.mjs +4 -4
- package/index.js +1 -1
- package/package.json +10 -8
- package/rollup.config.js +2 -2
- package/test-browser/index.html +3 -3
- package/test-nodejs/client.cjs +2 -2
- package/test-nodejs/client.mjs +2 -2
- package/test-nodejs/client_api_reply.mjs +2 -2
- package/test-nodejs/signaling.js +3 -3
- package/dist/iosignal.js.map +0 -1
- package/dist/iosignal.min.js.map +0 -1
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ Example of a client calling the reply API
|
|
|
71
71
|
|
|
72
72
|
```js
|
|
73
73
|
// web browser api client example
|
|
74
|
-
<script src="../dist/
|
|
74
|
+
<script src="../dist/io.min.js"></script>
|
|
75
75
|
<script>
|
|
76
76
|
const io = new IO('ws://localhost:7777')
|
|
77
77
|
|
|
@@ -99,12 +99,12 @@ Fri, 09 Feb 2024 14:24:37 GMT
|
|
|
99
99
|
### NodeJS Client
|
|
100
100
|
```js
|
|
101
101
|
// ESM
|
|
102
|
-
import {
|
|
102
|
+
import { IO } from "iosignal"
|
|
103
103
|
|
|
104
104
|
// CJS
|
|
105
|
-
// const {
|
|
105
|
+
// const { IO } = require('iosignal')
|
|
106
106
|
|
|
107
|
-
const io = new
|
|
107
|
+
const io = new IO('wss://io.iosignal.net/ws')
|
|
108
108
|
|
|
109
109
|
io.on('ready', ()=>{
|
|
110
110
|
console.log('ready cid:', io.cid)
|
|
@@ -122,11 +122,11 @@ Fri, 09 Feb 2024 14:24:37 GMT
|
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
### Browser Client : UMD(IIFE)
|
|
125
|
-
- local file: "./dist/
|
|
126
|
-
- CDN: https://cdn.jsdelivr.net/npm/iosignal@2.
|
|
125
|
+
- local file: "./dist/io.min.js"
|
|
126
|
+
- CDN: https://cdn.jsdelivr.net/npm/iosignal@2.2.0/dist/io.min.js
|
|
127
127
|
```html
|
|
128
128
|
<html>
|
|
129
|
-
<script src="../dist/
|
|
129
|
+
<script src="../dist/io.min.js"></script>
|
|
130
130
|
<script>
|
|
131
131
|
console.log('IO', IO) // default global variable name is IO
|
|
132
132
|
|
|
@@ -177,14 +177,14 @@ Fri, 09 Feb 2024 14:24:37 GMT
|
|
|
177
177
|
|
|
178
178
|
### Browser client : ESM
|
|
179
179
|
|
|
180
|
-
- local file: "./dist/
|
|
181
|
-
- CDN: https://cdn.jsdelivr.net/npm/iosignal@2.
|
|
180
|
+
- local file: "./dist/io.js"
|
|
181
|
+
- CDN: https://cdn.jsdelivr.net/npm/iosignal@2.2.0/dist/io.js
|
|
182
182
|
|
|
183
183
|
```html
|
|
184
184
|
<html>
|
|
185
185
|
|
|
186
186
|
<script type="module">
|
|
187
|
-
import IO from "../dist/
|
|
187
|
+
import IO from "../dist/io.js"
|
|
188
188
|
|
|
189
189
|
const io = new IO('wss://io.iosignal.net/ws')
|
|
190
190
|
io.listen('channel#topic', (...args)={
|