Files
ig-data-count/utility/writeToMarkdown.js

11 lines
356 B
JavaScript
Raw Normal View History

2020-03-19 08:07:47 +05:30
//@ts-check
/**
* @param {Array<{parts: number;count: number;person: String;}>} data
*/
module.exports = (data) => {
let writable = "Name | Count | Parts\n --- | --- | ---\n"
data.forEach(element => {
writable += `${element.person} | ${element.count} | ${element.parts}\n`
});
require('fs').writeFileSync("output.md", writable)
}