Socket
Socket
Sign inDemoInstall

pullstream

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pullstream - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

.travis.yml

5

package.json
{
"name": "pullstream",
"version": "0.0.5",
"version": "0.0.6",
"description": "A stream you can pull data from.",

@@ -28,4 +28,5 @@ "main": "pullstream.js",

"over": "~0.0.5",
"readable-stream": "0.0.3"
"readable-stream": "~0.2.0",
"setimmediate": "~1.0.1"
}
}

23

pullstream.js

@@ -5,6 +5,11 @@ 'use strict';

require("setimmediate");
var inherits = require("util").inherits;
var PassThrough = require('readable-stream/passthrough');
var PassThrough = require('stream').PassThrough;
var over = require('over');
if (!PassThrough) {
PassThrough = require('readable-stream/passthrough');
}
function PullStream(opts) {

@@ -17,3 +22,3 @@ var self = this;

if (self._flushed) {
process.nextTick(self._finish.bind(self));
self._finish();
}

@@ -92,13 +97,11 @@ });

if (this._readableState.length > 0) {
return process.nextTick(self._flush.bind(self, outputFn, callback));
return setImmediate(self._flush.bind(self, outputFn, callback));
}
this._flushed = true;
return process.nextTick(function() {
if (self._writesFinished) {
self._finish(callback);
} else {
callback();
}
});
if (self._writesFinished) {
self._finish(callback);
} else {
callback();
}
};

@@ -105,0 +108,0 @@

@@ -7,2 +7,4 @@ pullstream

[![Build Status](https://travis-ci.org/nearinfinity/node-pullstream.png)](https://travis-ci.org/nearinfinity/node-pullstream)
## Quick Examples

@@ -9,0 +11,0 @@

@@ -263,4 +263,4 @@ 'use strict';

"throw on calling data or end after end": function (t) {
t.expect(2);
"throw on calling write() after end": function (t) {
t.expect(1);
var ps = new PullStream({ lowWaterMark : 0 });

@@ -276,9 +276,2 @@ ps.end();

try {
ps.end(new Buffer('hello', 'utf8'));
t.fail("should throw error");
} catch (ex) {
t.ok(ex);
}
t.done();

@@ -285,0 +278,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