easy-json-stream
Advanced tools
+2
-2
@@ -47,4 +47,4 @@ var Transform = require('stream').Transform | ||
| if (++this.count < 2) | ||
| chunks.push(Object.keys(chunk).join(',')); | ||
| chunks.push(Object.keys(chunk).map(function(key) { return chunk[key] }).map(escapeCommasAndSingleQuotes).join(',')); | ||
| chunks.push(Object.keys(chunk).join(',') + '\n'); | ||
| chunks.push(Object.keys(chunk).map(function(key) { return chunk[key] }).map(escapeCommasAndSingleQuotes).join(',') + '\n'); | ||
| chunks.forEach(this.push.bind(this)); | ||
@@ -51,0 +51,0 @@ next(); |
+1
-1
| { | ||
| "name": "easy-json-stream", | ||
| "version": "1.3.1", | ||
| "version": "1.3.2", | ||
| "description": "Stream objects to JSON and JSON into objects.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -118,6 +118,6 @@ var path = require('path') | ||
| var headers = chunk.split(','); | ||
| t.deepEquals(headers, ['one', 'two', 'three'], 'it should emit the headers first'); | ||
| t.deepEquals(headers, ['one', 'two', 'three\n'], 'it should emit the headers first'); | ||
| }) | ||
| .on('end', function() { | ||
| t.equals(buffer[1], '1,2,3', 'it should emit rows of data'); | ||
| t.equals(buffer[1], '1,2,3\n', 'it should emit rows of data'); | ||
| t.end(); | ||
@@ -140,3 +140,3 @@ }).resume() | ||
| .on('end', function() { | ||
| t.equals(buffer[2], "'it\'s, one','it\'s, two','it\'s, three'", 'it should escape commas and single quotes'); | ||
| t.equals(buffer[2], "'it\'s, one','it\'s, two','it\'s, three'\n", 'it should escape commas and single quotes'); | ||
| t.end(); | ||
@@ -143,0 +143,0 @@ }).resume() |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
9460
0.21%