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

@kalm/ws

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kalm/ws - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

8

bin/ws.js

@@ -20,5 +20,5 @@ const isBrowser = (typeof WebSocket !== 'undefined');

if (handle && handle.readyState === 1)
handle.send(Buffer.from(payload));
handle.send(typeof payload === 'string' ? payload : JSON.stringify(payload));
else
handle._queue.push(payload);
handle._queue.push(JSON.stringify(payload));
}

@@ -35,8 +35,8 @@ function stop() {

connection._queue = [];
connection[evtType]('message', evt => emitter.emit('rawFrame', Buffer.from(evt.data || evt)));
connection[evtType]('message', evt => emitter.emit('frame', JSON.parse(evt.data || evt), (evt.data || evt).length));
connection[evtType]('error', err => emitter.emit('error', err));
connection[evtType]('close', () => emitter.emit('disconnect'));
connection[evtType]('open', () => {
emitter.emit('connect', connection);
connection._queue.forEach(payload => send(connection, payload));
emitter.emit('connect', connection);
});

@@ -43,0 +43,0 @@ return connection;

# Changelog
## [v4.0.0] - 2020-03-28
## [v5.0.0] - 2020-06-23
commit: [731491d](https://github.com/kalm/kalm.js/commit/731491d7b98f3116e0491905c99f9ece29d24d65)
commit: [#](https://github.com/kalm/kalm.js/commits)
## Breaking changes
- Changed default packet framing to be a pure json object
- Removed custom framing
- Added packet message cap
- Fixed multiplexing

@@ -15,2 +18,13 @@ ## Added

## [v4.0.0] - 2020-03-28
commit: [731491d](https://github.com/kalm/kalm.js/commit/731491d7b98f3116e0491905c99f9ece29d24d65)
## Added
- Added more error messages
- Added tests for transport packages
- Added CHANGELOG and LICENSE to all packages
- Added 'framing' option to set packet framing to be a pure json object
## [v3.3.0] - 2020-01-30

@@ -17,0 +31,0 @@

{
"name": "@kalm/ws",
"version": "4.0.0",
"version": "5.0.0",
"description": "WebSocket transport for Kalm",

@@ -5,0 +5,0 @@ "main": "bin/ws.js",

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