websocket-stream
Advanced tools
Comparing version 5.1.2 to 5.2.0
{ | ||
"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() | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23092
572
+ Addedreadable-stream@3.6.2(transitive)
+ Addedws@6.2.3(transitive)
- Removedultron@1.1.1(transitive)
- Removedws@3.3.3(transitive)
Updatedduplexify@^3.6.1
Updatedreadable-stream@^3.0.0
Updatedsafe-buffer@^5.1.2
Updatedws@^6.1.2