Socket
Socket
Sign inDemoInstall

csv-cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csv-cli - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "csv-cli",
"version": "0.1.0",
"version": "0.1.1",
"description": "A CLI wrapper around the node csv package",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -39,11 +39,15 @@ const { Transform } = require("stream");

const convertChunk = (chunk) => {
if (Buffer.isBuffer(chunk)) {
return chunk.toString();
}
else {
return chunk;
}
}
return new Transform({
objectMode: true,
transform(chunk, encoding, callback) {
if (Buffer.isBuffer(chunk)) {
data += chunk.toString();
}
else {
data += chunk;
}
data += convertChunk(chunk);

@@ -54,4 +58,11 @@ callback();

try {
this.push(JSON.parse(data));
const json = JSON.parse(data);
if (Array.isArray(json)) {
json.forEach(this.push.bind(this));
}
else {
this.push(json);
}
callback();

@@ -58,0 +69,0 @@ }

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