New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

complex-json2csv

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

complex-json2csv - npm Package Compare versions

Comparing version
0.0.1
to
0.0.2
+10
-6
jsonsplit.sh

@@ -6,9 +6,8 @@ #!/bin/bash

#get input file
fullinputfile=$1
inputfile=${fullinputfile%.json}
partsdir=${inputfile}_parts
#if not specified, then set the records to 100,000
if [ -z $2 ] ; then
if [ $# -eq 0 ]; then
echo "Error: Please provide an input file. "
echo "Usage: $0 inputfile.json [records]"
exit
elif [ $# -eq 1 ]; then
records=100000

@@ -19,2 +18,7 @@ else

#get input file
fullinputfile=$1
inputfile=${fullinputfile%.json}
partsdir=${inputfile}_parts
#create a directory to store the split files

@@ -21,0 +25,0 @@ mkdir -p $partsdir

{
"name": "complex-json2csv",
"preferGlobal": true,
"version": "0.0.1",
"author": "Dana M. Lewis",
"description": "command line json2csv converter that supports super large files and complex, unknown json schemas",
"license": "MIT",
"engines": {
"node": ">=0.10"
},
"bin": {
"complex-json2csv": "./complex-json2csv.js",
"jsonsplit": "./jsonsplit.sh"
},
"dependencies": {
"jquery": "~3.1.1",
"jsdom": "~9.11.0"
}
"name": "complex-json2csv",
"preferGlobal": true,
"version": "0.0.2",
"author": "Dana M. Lewis",
"description": "command line json2csv converter that supports super large files and complex, unknown json schemas",
"license": "MIT",
"engines": {
"node": ">=0.10"
},
"bin": {
"complex-json2csv": "./complex-json2csv.js",
"jsonsplit": "./jsonsplit.sh"
},
"dependencies": {
"jquery": "~3.1.1",
"jsdom": "~9.11.0"
}
}

@@ -5,2 +5,24 @@ ## JSON to CSV Converter

Previously a browser-side tool; attempting to turn it into a command line tool. Based on https://github.com/konklone/json.
* In the **web** version, conversion happens inside the browser, in straight JavaScript. It may choke on large files.
* With complex-csv2json.js, it can be run via the **command line**. It uses jsonsplit.sh to deal with large files.
To install and run via the command line:
* `npm install -g complex-json2csv`
* type the name of the command and provide an input file (`complex-json2csv inputfile.json`)
* This will print the output to the screen.
* To create a csv file: `complex-json2csv inputfile.json > outputfile.csv`
Please file all bugs [in the issue tracker](https://github.com/konklone/json/issues).
Read more about the converter and why I built it: "[Making JSON as simple as a spreadsheet](http://sunlightfoundation.com/blog/2014/03/11/making-json-as-simple-as-a-spreadsheet/)".
## Public domain
This project makes uses of certain externally licensed works, including (but not limited to) Bootstrap, Highlight.js, jQuery and jquery-csv. Any such works retain their original license, even if they have been subsequently modified by me.
All **other files** in this project are [dedicated to the public domain](LICENSE). As spelled out in [CONTRIBUTING](CONTRIBUTING.md):
> The project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the [CC0 1.0 Universal public domain dedication](http://creativecommons.org/publicdomain/zero/1.0/).
> All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.