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.2 to 5.2.0

16

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

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

"dependencies": {
"duplexify": "^3.5.1",
"duplexify": "^3.6.1",
"inherits": "^2.0.1",
"readable-stream": "^2.3.3",
"safe-buffer": "^5.1.1",
"ws": "^3.2.0",
"readable-stream": "^3.0.0",
"safe-buffer": "^5.1.2",
"ws": "^6.1.2",
"xtend": "^4.0.0"

@@ -36,5 +36,5 @@ },

"beefy": "^2.1.1",
"browserify": "^14.5.0",
"concat-stream": "^1.4.7",
"tape": "^4.8.0"
"browserify": "^16.2.3",
"concat-stream": "^1.6.2",
"tape": "^4.9.1"
},

@@ -41,0 +41,0 @@ "optionalDependencies": {},

@@ -75,2 +75,6 @@ 'use strict'

stream = proxy
} else if (isBrowser) {
stream = proxy
stream.cork()
socket.onopen = onopenBrowser
} else {

@@ -135,2 +139,7 @@ stream = duplexify.obj()

function onopenBrowser () {
stream.uncork()
stream.emit('connect')
}
function onclose() {

@@ -137,0 +146,0 @@ stream.end()

@@ -62,1 +62,14 @@ var ws = require('./')

})
test('cork logic test', function (t) {
var stream = ws('ws://localhost:8343', { binary: true })
stream.on('data', function(o) {
t.equal(o.toString(), 'hello', 'success!')
stream.destroy()
t.end()
})
stream.cork()
stream.write('he')
stream.write('l')
stream.write('lo')
stream.uncork()
})
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