zemirco / json2csv-stream

Transform stream from json to csv
52 stars 17 forks source link

Support for aliases #11

Closed jeremyvergnas closed 5 years ago

jeremyvergnas commented 7 years ago

We would like to provide labels/aliases for the headers.

In the documentation it says that we could manipulate the header

parser.on('header', function(data) {
  console.log(' ++ yeah header found ++');
  console.log(data);
});

So this is being called indeed, but when I return a comma separated string or an array of strings, it doesn't set it on the headers.

knownasilya commented 5 years ago

https://github.com/zemirco/json2csv now has a streams API, please use that module as this one is deprecated/unmaintained.