No title Revision 363836336334 (Fri Jun 05 2009 at 13:45) - Diff Link to this snippet: https://friendpaste.com/1M1SOKKvTMtBfU0I7eXCvQ Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 1234567891011121314151617181920function(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 { body: csv_row([doc.title, doc.url, doc.categories.join(','), doc.tags.join(',')]) }; } else { return ""; }}