Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

json2bash

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json2bash - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

31

jsonarr2csv.js

@@ -85,3 +85,3 @@ #!/usr/bin/env node

type: 'string',
default: 'idx'
default: 'null'
}),

@@ -99,2 +99,8 @@ yargs.positional('fileout', {

})
.option('numberedindex', {
alias: 'n',
default: false,
type: 'boolean',
description: 'add index column numbered'
})
.option('verbose', {

@@ -117,4 +123,6 @@ alias: 'v',

var { idxname, fileout, debug, verbose } = argv;
var { idxname,numberedindex, fileout, debug, verbose } = argv;
if (idxname != "null") numberedindex = true;
if (numberedindex==true && idxname=="null")idxname = "idx";

@@ -125,3 +133,2 @@

//Possible later support for .env preconf

@@ -190,12 +197,2 @@ try {

function getCSVLines(data) {
var l="";
for (const [key, value] of Object.entries(data)) {
var e = "";
for (const [key2, value2] of Object.entries(value)) {
}
}
return l;
}
function getCSVLinesPTO(data) {

@@ -212,3 +209,5 @@ var h="";

var c = 0;
ls += key + ",";
var _prestringIndex = key + ",";
if (!numberedindex) _prestringIndex = "";
ls += _prestringIndex;

@@ -235,3 +234,5 @@ for (const [key2, value2] of Object.entries(value)) {

}
return idxname + ","+ h + "\n" + ls;
var _prestring = idxname + ",";
if (!numberedindex) _prestring = "";
return _prestring+ h + "\n" + ls;
}

@@ -238,0 +239,0 @@

{
"name": "json2bash",
"version": "1.0.5",
"version": "1.1.0",
"description": "A CLI to export json object to bash env. Also json array to csv",

@@ -5,0 +5,0 @@ "main": "json2bash.js",

@@ -39,2 +39,3 @@ # json2bashenv

```sh
#default (has no index)
jsonarr2csv sample-jsonarr2csv.json >out.csv

@@ -44,2 +45,5 @@

jsonarr2csv sample-jsonarr2csv.json myindexname >out.csv
#with default index
jsonarr2csv sample-jsonarr2csv.json -d >out.csv
```

@@ -46,0 +50,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