max-mapper / csv-write-stream

A CSV encoder stream that produces properly escaped CSVs
BSD 2-Clause "Simplified" License
204 stars 37 forks source link

exception when headers passed to the csvWriter is empty array #49

Open osadan opened 1 year ago

osadan commented 1 year ago

if an empty array is added as headers

csvWriter({ headers: []})

I receive the following error ""return result + "\n" Unexpected token 'return' at csv-write-stream/index.js (the compile function)