0.0.2 • Published 12 years ago

csvify v0.0.2

Weekly downloads
5
License
-
Repository
github
Last release
12 years ago

CSVify

I can't probably call this a streamming CSV writter, due to the lack of features, but it's enough to have the functionality I needed ATM. I'll probably add more features as needed, feel free to do it as well with a pull request ;)

Installation

npm install --save csvify

Usage

It's a transform stream that receives arrays and pipes CSV lines.

var csvStream = new CSVify(','); // use ',' as a delimiter

csvStream.writeHead(['name', age', 'address']); // write a header

csvStream.writeHead('name', 'age', 'address'); // has the same behaviour as above

csvStream.write(['JJ', 23, 'Rua da Prata nº80, Lisboa']);

var line = csvStream.read();
console.log(line); // "JJ",23,"Rua da Prata nº80, Lisboa"\r\n

License

MIT!

0.0.2

12 years ago

0.0.1

12 years ago