Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

base-websocket

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base-websocket - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"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.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc