0.0.2 • Published 11 years ago

cold-sweat v0.0.2

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

node-cold-sweat

Massage csv data into a specific json format

Pipe a stream of csv, and this returns a JSON object holding the properties. The returned object looks like this:

{
  graph: {
    title:
    datasequences: [ {
        title: <csv row 1, column n + 1>
        datapoints: [ {
            title:
            value:
          }, ...
        ]
      }
      ...
    ]
  }
}

=== Example

fs.createReadStream('./data.csv').pipe(sweat(function (err, result) {
  console.log(result)

})