(results: Record<string, number>)
| 11 | console.table(getTable(times)); |
| 12 | |
| 13 | function getTable(results: Record<string, number>) { |
| 14 | const table = Object.keys(results) |
| 15 | // Add the framework name to the object |
| 16 | .map((framework) => ({ |
| 17 | name: framework, |
| 18 | time: results[framework], |
| 19 | })) |
| 20 | // Rank by tti |
| 21 | .sort(sortBy('time')) |
| 22 | // Pick the display values |
| 23 | .map((item) => ({ |
| 24 | Name: item.name, |
| 25 | 'Build Time (Seconds)': Math.round(item.time / 100) / 10, |
| 26 | })); |
| 27 | |
| 28 | return table; |
| 29 | } |
no test coverage detected