Comparing version 0.3.14 to 1.0.0
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
42868
0
30
980
0
1
1
4
148
1
- Removedglob@*
- Removed@isaacs/cliui@8.0.2(transitive)
- Removedansi-regex@5.0.16.1.0(transitive)
- Removedansi-styles@4.3.06.2.1(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@2.0.1(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcross-spawn@7.0.6(transitive)
- Removedeastasianwidth@0.2.0(transitive)
- Removedemoji-regex@8.0.09.2.2(transitive)
- Removedforeground-child@3.3.0(transitive)
- Removedglob@11.0.0(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedjackspeak@4.0.2(transitive)
- Removedlru-cache@11.0.2(transitive)
- Removedminimatch@10.0.1(transitive)
- Removedminipass@7.1.2(transitive)
- Removedpackage-json-from-dist@1.0.1(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedpath-scurry@2.0.0(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedsignal-exit@4.1.0(transitive)
- Removedstring-width@4.2.35.1.2(transitive)
- Removedstrip-ansi@6.0.17.1.0(transitive)
- Removedwhich@2.0.2(transitive)
- Removedwrap-ansi@7.0.08.1.0(transitive)