Add headerParser option
Hi there. First of all thank you so much for this package, it's incredibly useful, and I am using it every day at work!
I wanted to ask if it is possible to add an option for headerParser that will accept a function, to be able to do common parsing tasks (e.g. camel-casing, etc), that way one could specify some logic for parsing all headers without the need to provide an array of pre-defined header names. I think this will be a valuable addition. Thank you in advance!
If headers is an Array, why won't you simply use map to parse each header, before you feed the Array into the options Object?
I am getting the csv data from a 3rd party API endpoint, and although the request contains the list of columns to be retrieved, I don't always know how exactly the header will be laid out, so my only option is to provide a list of statically-typed headers to override the supplied one. (luckily the csv columns are always in the same order as requested) Thus, an option to pass a parsing function will be super-handy. Many Thanks again for taking the time for my issue!
Hi, even if you're getting the data from a third party, I'd say you can transform it before feeding it into this module.