easy-json-stream
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -23,3 +23,4 @@ var Transform = require('stream').Transform | ||
StringifyStream.prototype._flush = function(done) { | ||
this.push(this.tail); | ||
if (!this.first) | ||
this.push(this.tail); | ||
done(); | ||
@@ -26,0 +27,0 @@ } |
{ | ||
"name": "easy-json-stream", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Stream objects to JSON and JSON into objects.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -93,2 +93,13 @@ var path = require('path') | ||
; | ||
}); | ||
test('stringify [no data]', function(t) { | ||
var buffer = []; | ||
var stream = json.stringify({ head: '[', tail: ']' }) | ||
.on('data', buffer.push.bind(buffer)) | ||
.on('end', function() { | ||
t.notOk(buffer.length, 'no data added to buffer'); | ||
t.end(); | ||
}) | ||
stream.end(); | ||
}); |
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
7283
154