New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sockjs-client

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sockjs-client - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

10

lib/sockjs-client.js

@@ -56,3 +56,3 @@ (function (parent) {

function SockJSClient (server) {
var parsed, pathname, serverId, sessionId;
var parsed, serverId, sessionId;

@@ -69,8 +69,5 @@ parsed = url.parse(server);

pathname = parsed.pathname;
while (undefined !== pathname &&
'/' === pathname.charAt(pathname.length - 1)) {
pathname = pathname.slice(0, pathname.length - 1);
if (parsed.pathname === '/') {
parsed.pathname = '';
}
parsed.pathname = pathname;

@@ -272,3 +269,2 @@ serverId = Math.round(Math.random() * 999);

this.partialChunk = chunk.slice(2);
console.log("thud");
break;

@@ -275,0 +271,0 @@ case 'a': // data

{
"name": "sockjs-client",
"author": "Matthew Sackman",
"version": "0.1.1",
"version": "0.1.2",
"keywords": ["websockets", "websocket"],

@@ -6,0 +6,0 @@ "repository": {

@@ -5,1 +5,10 @@ # SockJS Client Node

the XHR Streaming transport is supported.
## Usage
var sjsc = require('sockjs-client');
var client = sjsc.create("http://localhost/sjsServer");
client.on('connection', function () { // connection is established });
client.on('data', function (msg) { // received some data });
client.on('error', function (e) { // something went wrong });
client.write("Have some text you mighty SockJS server!");
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