added a csv.generate function

Hi,
I exposed a generate() function, mainly to simplify the tests of express apps that use your package.