No title Revision 663737643064 (Wed Nov 16 2011 at 05:43) - Diff Link to this snippet: https://friendpaste.com/1W51qISAkmAUZ2JG4Z0FBE Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 12345678910111213141516function(head, row, req, row_info) { csv_row = function(arr) { return ['"' + item + '"' for each (item in arr)].join(',') + '\n'; } if (head) { return { headers: { 'Content-Type': 'text/csv' }, body: csv_row(['Titel', 'URL', 'Categoriƫn', 'Tags']) }; } else if (row) { doc = row.value; return csv_row([doc.title, doc.url, doc.categories.join(','), doc.tags.join(',')]); }}