cold-sweat

0.0.2 • Public • Published

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

var sweat = require('cold-sweat')
  , fs = require('fs')

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

})

Readme

Keywords

none

Package Sidebar

Install

npm i cold-sweat

Weekly Downloads

1

Version

0.0.2

License

BSD

Last publish

Collaborators

  • koopa