1.0.4 • Published 8 years ago

@soyuka/csv2json v1.0.4

Weekly downloads
-
License
WTFPL
Repository
github
Last release
8 years ago

csv2json Build Status

This does work as a stream, and you can do:

let csv2json = require('@soyuka/csv2json')

fs.createReadStream('some.csv')
.pipe(csv2json)
.pipe(stdout)

It won't emit Javascript objects but JSON strings ! Please use csv-parser if you need javascript objects.

Advantages:

  • no dependencies
  • fast
  • small memory footprint

Man

Name csv2json - Basic Csv To Json

Synopsis csv2json --separator destination

Description

    Transform to json and pipe to jq:

    csv2json < data.csv | jq . 

    Redirect output to file:

    csv2json < data.csv > data.json

    File destination:

    cat data.csv | csv2json --separator , data.json

Options

    --separator         sets the csv separator, default ;
    --quote             csv quote character, default "
1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago