base-websocket
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "base-websocket", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "webSocket basic module", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -6,19 +6,23 @@ # Base websocket | ||
``` | ||
import { url, onOpen, onResponse, onError, onClose } from 'base-websocket'; | ||
import { initWebSocket, send, closeWS } from 'base-websocket'; | ||
``` | ||
### url | ||
### initWebSocket | ||
type: function params: { url, onOpen, onResponse, onError, onClose } | ||
#### url | ||
Websocket connect path | ||
### onOpen | ||
#### onOpen | ||
When websocket connect use this function. | ||
### onResponse | ||
#### onResponse | ||
Server response function, data is json. | ||
### onError, onClose | ||
#### onError, onClose | ||
Error, close life cycle. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1175
28