Skip to content

Commit 7653db2

Browse files
committed
feat: update readme
1 parent b550160 commit 7653db2

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ yarn add @skillnull/webeesocket
1010

1111
### 使用
1212
```js
13-
import { QUOTE } from '@skillnull/webeesocket'
13+
import { WEBSOCKET } from '@skillnull/webeesocket'
1414

15-
this.QUOTE = new QUOTE({
15+
this.WEBSOCKET = new WEBSOCKET({
1616
env: 'development'
1717
})
1818

1919
/**
2020
* code: 与服务端约定的用于监听的 code
2121
*/
22-
this.QUOTE.on(code, (data) => {
22+
this.WEBSOCKET.on(code, (data) => {
2323
// handler data
2424
})
2525

@@ -31,7 +31,7 @@ this.QUOTE.on(code, (data) => {
3131
* not_stringify?: <Boolean> 是否取消将参数 body 进行 JSON.stringify,默认 false
3232
* }
3333
*/
34-
this.QUOTE.subscribe({
34+
this.WEBSOCKET.subscribe({
3535
key: "require",
3636
body: "require",
3737
not_stringify: "not require"
@@ -45,7 +45,7 @@ this.QUOTE.subscribe({
4545
* not_stringify?: <Boolean> 是否取消将合并后的参数 body 进行 JSON.stringify,默认 false
4646
* }
4747
*/
48-
this.QUOTE.unsubscribe({
48+
this.WEBSOCKET.unsubscribe({
4949
key: "require",
5050
body: "require",
5151
not_stringify: "not require"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.0.2",
2+
"version": "0.0.3",
33
"name": "@skillnull/webeesocket",
44
"description": "通过事件驱动机制 EventEmitter 对 Websocket 和微信 connectSocket 进行集成封装",
55
"main": "dist/WebEESocket",

0 commit comments

Comments
 (0)