Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 1.3.1 to 1.3.2

4

index.js

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

{
"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()

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc