Socket
Socket
Sign inDemoInstall

websocket-stream

Package Overview
Dependencies
Maintainers
5
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

websocket-stream - npm Package Compare versions

Comparing version 5.1.1 to 5.1.2

2

package.json
{
"name": "websocket-stream",
"version": "5.1.1",
"version": "5.1.2",
"license": "BSD-2-Clause",

@@ -5,0 +5,0 @@ "description": "Use websockets with the node streams API. Works in browser and node",

@@ -18,12 +18,2 @@ 'use strict'

proxy._destroy = function(err, cb) {
var self = this
this.push(null)
this.end()
process.nextTick(function() {
cb(err);
self.emit('close')
})
}
return proxy

@@ -110,3 +100,3 @@ }

if (coerceToBuffer && typeof chunk === 'string') {
chunk = new Buffer(chunk, 'utf8')
chunk = Buffer.from(chunk, 'utf8')
}

@@ -123,3 +113,3 @@ socket.send(chunk, next)

if (coerceToBuffer && typeof chunk === 'string') {
chunk = new Buffer(chunk, 'utf8')
chunk = Buffer.from(chunk, 'utf8')
}

@@ -126,0 +116,0 @@

@@ -5,2 +5,3 @@ var http = require('http')

var WebSocketServer = require('ws').Server
var Buffer = require('safe-buffer').Buffer

@@ -48,5 +49,5 @@ echo.start(function(){

if (!Buffer.isBuffer(data)) {
ws.send(new Buffer('fail'))
ws.send(Buffer.from('fail'))
} else {
ws.send(new Buffer('success'))
ws.send(Buffer.from('success'))
}

@@ -53,0 +54,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