Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stream-url

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-url - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

3

package.json
{
"name": "stream-url",
"version": "0.2.1",
"version": "0.2.2",
"homepage": "http://github.com/gritzko/stream-url",

@@ -23,2 +23,3 @@ "repository": {

"dependencies": {
"duplexify": "3.4.5"
},

@@ -25,0 +26,0 @@ "devDependencies": {

@@ -0,33 +1,6 @@

const duplexify = require('duplexify');
const Duplex = require('stream').Duplex;
class Duplexer extends Duplex {
constructor (reader, writer) {
super({allowHalfOpen: false});
this.reader = reader;
this.writer = writer;
this._read_cb = data=>this.push(data);
this._end_cb = ()=>this.push(null);
this.reader.on('data', this._read_cb);
this.reader.on('close', this._end_cb);
}
_write(chunk, encoding, callback) {
console.log('W', chunk);
this.writer.write(chunk, encoding, callback);
}
_read(size) {
}
end () {
this.reader.pause();
super.end();
}
}
function std_listen (url, options, callback) {
let stdio_stream = new Duplexer(process.stdin, process.stdout);
let stdio_stream = duplexify (process.stdout, process.stdin);
const serv = {

@@ -45,3 +18,3 @@ on: function (evname, cb) {

function std_connect (url, options, callback) {
let stdio_stream = new Duplexer(process.stdin, process.stdout);
let stdio_stream = duplexify (process.stdout, process.stdin);
callback(null, stdio_stream);

@@ -48,0 +21,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