{"notes": [{"noteId": "EW0u2LoAZTYv", "title": "표 표시 (renderTable)", "type": "code", "mime": "application/javascript;env=frontend", "content": "module.exports = counts => {\n const $statsTable = api.$container.find('.stats-table');\n \n addRow('합계', \n counts.reduce((acc, cur) => acc + cur.countNotDeleted, 0), \n counts.reduce((acc, cur) => acc + cur.countDeleted, 0)\n );\n \n for (const count of counts) {\n addRow(count.type, count.countNotDeleted, count.countDeleted);\n }\n\n function addRow(type, countNotDeleted, countDeleted) {\n $statsTable.append(\n $(\"