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.0.12 to 0.0.14

3

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

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

"test/*.js",
"index.js",
"LICENSE",

@@ -21,0 +20,0 @@ "README.md"

@@ -34,2 +34,4 @@ Stream URLs

[![Build Status](https://travis-ci.org/gritzko/stream-url.svg?branch=master)](https://travis-ci.org/gritzko/stream-url)
## API

@@ -36,0 +38,0 @@

@@ -20,3 +20,3 @@ "use strict";

ZeroStream.prototype.drainQueue = function () {
ZeroStream.prototype.drain_queue = function () {
try {

@@ -52,3 +52,3 @@ while (this.data.length && this.on_data) {

if (something!==undefined && something!==null) {
if (this.pair.on_data) {
if (this.pair.on_data && !this.pair.data.length) {
try {

@@ -55,0 +55,0 @@ this.pair.on_data(something);

@@ -14,2 +14,3 @@ "use strict";

t.plan(8);
// 0: listener is ready immediately and invokes a callback synchronously
var server = su.listen('0:string', function(err, serv) {

@@ -36,3 +37,2 @@ serv_rem = serv;

t.pass('stream ends'); // TODO
t.end();
});

@@ -45,7 +45,11 @@ stream.write(dummy_object);

tape ('1.B connect fail', function (t) {
t.plan(2);
t.plan(4);
var callback_called = false;
su.connect('0:nonexisting', function (err, stream) {
t.ok(err, 'got an error');
t.notOk(stream, 'no stream');
t.notOk(callback_called, 'callback invoked twice');
callback_called = true;
});
t.notOk(callback_called, 'callback invoked synchronously');
});

@@ -73,1 +77,18 @@

});
tape ('1.D drain queue', function (t) {
su.listen('0:abc', function (err, server) {
server.on('connection', function (stream) {
var async = false;
stream.on('data', function(data) {
t.equal(data, 'queued');
t.equal(async, true);
t.end();
});
async = true;
});
});
su.connect('0:abc', function (err, stream) {
stream.write('queued');
});
});
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