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.14 to 1.0.0

batcher.js

69

index.js

@@ -1,42 +0,33 @@

/*jslint node: true */
// import {Readable} from 'stream';
// exports.Batcher = require('./batcher');
// exports.EventSource = require('./eventsource');
// exports.Filter = require('./filter');
// exports.json = require('./json'); // for json.Parser and json.Stringifier
// exports.Mapper = require('./mapper');
// exports.property = require('./property'); // for property.Filter and property.Omitter
// exports.Queue = require('./queue');
// exports.Sink = require('./sink');
// exports.Splitter = require('./splitter');
// exports.Timeout = require('./timeout');
// exports.Transformer = require('./transformer');
// exports.Walk = require('./walk');
// exports.VM = require('./vm');
/** Read a stream to the end, storing all chunks in an array.
exports.Batcher = require('./lib/batcher');
exports.EventSource = require('./lib/eventsource');
exports.Filter = require('./lib/filter');
exports.Glob = require('./lib/glob');
exports.json = require('./lib/json'); // for json.Parser and json.Stringifier
exports.Mapper = require('./lib/mapper');
exports.property = require('./lib/property'); // for property.Filter and property.Omitter
exports.Queue = require('./lib/queue');
exports.Sink = require('./lib/sink');
exports.Splitter = require('./lib/splitter');
exports.Timeout = require('./lib/timeout');
exports.Transformer = require('./lib/transformer');
exports.Walk = require('./lib/walk');
exports.VM = require('./lib/vm');
For example, to read all STDIN:
exports.readToEnd = function(stream, callback) {
/** Read a stream to the end, buffering all chunks into an array.
streaming.readToEnd(process.stdin, function(err, chunks) {
if (err) throw err;
var input = chunks.join('');
console.log('Got input of length: ' + input.length);
});
* `callback` Function Callback function with signature: function(err, [chunk_01, chunk_02, ...])
For example, to read all STDIN:
streaming.readToEnd(process.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);
});
};
*/
function readToEnd(stream, callback) {
var chunks = [];
return stream
.on('error', callback)
.on('data', function (chunk) { return chunks.push(chunk); })
.on('end', function () { return callback(null, chunks); });
}
exports.readToEnd = readToEnd;
{
"name": "streaming",
"version": "0.3.14",
"version": "1.0.0",
"description": "Transforms and other streaming helpers",

@@ -17,15 +17,15 @@ "keywords": [

"type": "git",
"url": "git://github.com/chbrown/streaming.git"
"url": "https://github.com/chbrown/streaming.git"
},
"author": "Christopher Brown <io@henrian.com>",
"license": "MIT",
"dependencies": {
"glob": "*"
},
"devDependencies": {
"tap": "*"
"babel-core": "^5.0.0",
"declarations": "*",
"mocha": "*",
"typescript": "next"
},
"scripts": {
"test": "tap test"
"test": "make test"
}
}

@@ -7,12 +7,3 @@ # streaming

* [Glob](#glob)
### `streaming.Glob`
`new Glob(pattern, options)` inherits `stream.Readable`
* _readableState.objectMode: true
### `streaming.Filter`

@@ -126,13 +117,12 @@

|:----|:----|:----|:----|:----|
| true | true | true | true | true |
| false | true | false | true | true |
| undefined | true | true | true | true |
| true | false | true | false | false |
| **true** | **true** | **true** | **true** | **true** |
| false | **true** | false | **true** | **true** |
| undefined | **true** | **true** | **true** | **true** |
| **true** | false | **true** | false | false |
| false | false | false | false | false |
| undefined | false | true | false | false |
| true | undefined | true | false | false |
| undefined | false | **true** | false | false |
| **true** | undefined | **true** | false | false |
| false | undefined | false | false | false |
| undefined | undefined | true | false | false |
| undefined | undefined | **true** | false | false |
(Only `_writableState` has a `decodeStrings` field.)

@@ -156,4 +146,5 @@

## License
Copyright 2013-2014 Christopher Brown. [MIT Licensed](http://opensource.org/licenses/MIT).
Copyright 2013-2015 Christopher Brown. [MIT Licensed](http://chbrown.github.io/licenses/MIT/#2013-2015).

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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