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

promise-ws

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promise-ws - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

8

lib/Client.js

@@ -378,6 +378,10 @@ 'use strict';

close() {
this._ws && this._ws.terminate();
this._ws = null;
var _this4 = this;
return _asyncToGenerator(function* () {
_this4._ws && _this4._ws.terminate();
_this4._ws = null;
})();
}
}
exports.default = Client;

@@ -91,3 +91,3 @@ 'use strict';

/* istanbul ignore next */
const types = emitter.eventNames() || Object.keys(emitter._events);
const types = typeof emitter.eventNames === 'function' ? emitter.eventNames() : Object.keys(emitter._events);

@@ -94,0 +94,0 @@ types.forEach(type => {

{
"name": "promise-ws",
"description": "A Promise-Based WebSocket implementation for Node.js",
"version": "0.4.0",
"version": "0.4.1",
"main": "lib/index",

@@ -6,0 +6,0 @@ "files": [

@@ -28,2 +28,3 @@ # promise-ws

* [server#replyCount\(name\)](#serverreplycountname)
* [server#replyClose\(shouldClose\)](#serverreplycloseshouldclose)
* [server#request\(name\[, ...args\]\)](#serverrequestname-args)

@@ -142,2 +143,8 @@ * [server#wss\(\)](#serverwss)

### server#onReplyClose(shouldClose)
1. `shouldClose` \<Function\>: The callback function to decide to close or not. Should return a promise with a Boolean.
Add a reply to close function. Will be called when client calls `requestClose()`. If `shouldClose` returns `true`, the server will be closed.
### server#request(name[, ...args])

@@ -144,0 +151,0 @@

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