UNPKG

docparse-dumpinvoices

Version:

takes a list of couchdb invoice ids and exports the data contained within those invoices to an Excel spreadsheet

14 lines (13 loc) 337 B
module.exports = function (costs) { if (costs.length === 0) { return '' } var costNotes = costs.map(function (cost) { var description = cost.description var value = cost.value var output = [description,value].join(': ') return output }) var costNotesString = costNotes.join(', ') return costNotesString }