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

fs-stream-websocket

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-stream-websocket - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

.npmignore

12

fs.js
var path = require('path');
var querystring = require('querystring');
var websocket = require('websocket-stream');
var through = require('through');
var through2 = require('through2');
var Buffer = require('buffer').Buffer; // Included for explicit Browserify support.

@@ -34,6 +34,6 @@

var ws = websocket(wsurl);
var out = through(bufferCheck);
var out = through2(bufferCheck);
return ws.pipe(out);
function bufferCheck(chunk) {
function bufferCheck(chunk, enc, callback) {
// If chunk is an ArrayBuffer, this means no encoding was specified,

@@ -47,3 +47,5 @@ // so websocket-stream just passed it along raw, which for websockets

this.queue(chunk);
this.push(chunk);
callback();
}

@@ -55,3 +57,3 @@ }

var ws = websocket(wsurl);
var input = through();
var input = through2();
input.pipe(ws);

@@ -58,0 +60,0 @@ return input;

{
"name": "fs-stream-websocket",
"version": "0.1.0",
"version": "0.1.1",
"description": "`fs.createReadStream` and `fs.createWriteStream` over a websocket, assumedly in a browser.",

@@ -27,5 +27,5 @@ "main": "server.js",

"dependencies": {
"through": "^2.3.4",
"websocket-stream": "^0.5.1",
"debug": "^0.8.0"
"debug": "^0.8.0",
"through2": "^0.4.1",
"websocket-stream": "^0.5.1"
},

@@ -32,0 +32,0 @@ "devDependencies": {

@@ -24,3 +24,2 @@ var test = require('tape');

var all = concat(function(data) {
t.ok(typeof data === 'string', 'data is a string');
t.equal(JSON.parse(data).main, 'server.js');

@@ -66,3 +65,3 @@ echo.http.close(t.end);

out.on('end', function() {
out.on('finish', function() {
// There does not _appear_ to be a way to know when the server has

@@ -69,0 +68,0 @@ // actually finished writing the file, since the websocket connection

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