You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

easy-json-stream

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-json-stream - npm Package Compare versions

Comparing version

to
1.1.0

3

index.js

@@ -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();
});