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

streaming

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

streaming - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

28

index.js

@@ -1,2 +0,2 @@

'use strict'; /*jslint es5: true, node: true, indent: 2 */ /* globals setImmediate */
'use strict'; /*jslint es5: true, node: true, indent: 2 */

@@ -10,1 +10,27 @@ exports.Glob = require('./lib/glob');

exports.Timeout = require('./lib/timeout');
exports.readToEnd = function(stream, callback) {
/** Read a stream to the end, buffering all chunks into an array.
* `callback` Function Callback function with signature: function(err, [chunk_01, chunk_02, ...])
For example, to read all STDIN:
streaming.readToEnd(sys.stdin, function(err, chunks) {
if (err) throw err;
var input = chunks.join('');
console.log('Got input of length: ' + input.length);
});
*/
var chunks = [];
return stream
.on('error', callback)
.on('data', function(chunk) {
chunks.push(chunk);
})
.on('end', function() {
callback(null, chunks);
});
};

2

package.json
{
"name": "streaming",
"version": "0.3.1",
"version": "0.3.2",
"description": "Transforms and other streaming helpers",

@@ -5,0 +5,0 @@ "keywords": [

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