MCPcopy Create free account
hub / github.com/FSGModding/FSG_Mod_Assistant / makeLine

Function makeLine

test/tests/packagestat.js:68–78  ·  view source on GitHub ↗
(type, data)

Source from the content-addressed store, hash-verified

66const toMByte = (num) => typeof num !== 'number' ? num : Intl.NumberFormat('en', {maximumFractionDigits : 2, minimumFractionDigits : 2}).format(num / 1024 / 1024)
67
68const makeLine = (type, data) => {
69 return [
70 '| ', type.padEnd(11), ' |',
71 padData(toNum(data.total), 6), ' |',
72 padData(toNum(data.blank), 6), ' |',
73 padData(toNum(data.code), 7), ' |',
74 padData(toNum(data.comment), 7), ' |',
75 padData(toNum(data.size), 11), ' |',
76 padData(toMByte(data.size), 6), ' MB |'
77 ].join('')
78}
79const tblHeader = '| ----------- | ----: | ----: | -----: | -----: | ---------: | -------: |'
80
81const countFiles = (test) => {

Callers 1

countFilesFunction · 0.85

Calls 3

padDataFunction · 0.85
toNumFunction · 0.85
toMByteFunction · 0.85

Tested by

no test coverage detected