csvy
v0.5.0
Published
yaml/json converter to csv
Downloads
4
Readme
CSVy
yaml/json → csv
Flattens fields and arrays:
{
"name": {
"first": "John",
"last": "Snow"
},
"tags": ["first", "second", "last"]
}
turns to:
"name.first","name.last","tags.0","tags.1","tags.2"
"John","Snow","first","second","last"
Installation
npm i csvy -g
Usage
Usage: csvy [options]
yaml/json converter to csv
Options:
-h, --help output usage information
-V, --version output the version number
-d, --delimiter <delimiter> delimiter symbol
-o, --output <file> output file
examples:
csv -o test.csv ./test.json
curl -L https://raw.githubusercontent.com/gko/csvy/master/test/test.yml | csvy
You can also use it from node:
const convert = require('csvy');
convert(`{"a":1}`, {delimiter: ';'})
Tests
To run tests you simply need to do:
npm run test
License
Copyright (c) 2016 Konstantin Gorodinskiy