Init
This commit is contained in:
11
utility/writeToMarkdown.js
Normal file
11
utility/writeToMarkdown.js
Normal file
@@ -0,0 +1,11 @@
|
||||
//@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)
|
||||
}
|
Reference in New Issue
Block a user