Comparing version 0.3.10 to 0.3.11
@@ -43,8 +43,14 @@ /*jslint node: true */ | ||
var chunk = buffer.toString(this._encoding); | ||
var obj; | ||
try { | ||
var obj = JSON.parse(chunk); | ||
this.push(obj); | ||
obj = JSON.parse(chunk); | ||
} catch (err) { | ||
this.emit('error', err); | ||
} | ||
if (obj !== undefined) { | ||
// this.push() inside the try-catch can lead to catching errors farther | ||
// down the pipeline, which is undesirable | ||
this.push(obj); | ||
} | ||
}; |
{ | ||
"name": "streaming", | ||
"version": "0.3.10", | ||
"version": "0.3.11", | ||
"description": "Transforms and other streaming helpers", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
# streaming | ||
A few stream helpers, abiding by the new-style Node.js stream standards ("Streams2"). | ||
A few stream helpers, built for Node.js 0.10+ streams ("Streams2"). | ||
npm install streaming | ||
* [Glob](#glob) | ||
### `streaming.Glob` | ||
@@ -15,2 +17,9 @@ | ||
### `streaming.Filter` | ||
`new Filter(predicate)` inherits `stream.Readable` | ||
* _readableState.objectMode: true | ||
### `streaming.json.Stringifier` | ||
@@ -91,3 +100,2 @@ | ||
var streaming = require('./'); | ||
var walk = new streaming.Walk('/usr/local'); | ||
@@ -94,0 +102,0 @@ walk.on('error', function(err) { |
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
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
27113
573
157