Repository navigation
Commit ef631c8
committed
refactor: extract table utilities to dedicated _table.ts file
- Create new src/_table.ts with ResponsiveTable class and formatting functions
- Move table-related utilities from _utils.ts to _table.ts:
- ResponsiveTable class with responsive design and compact mode support
- formatNumber(), formatCurrency() for data formatting
- formatModelsDisplay(), formatModelsDisplayMultiline() for model display
- pushBreakdownRows() for model breakdown table rows
- TableRow, TableOptions, TableCellAlign types
- Update imports in all command files to use _table.ts instead of _utils.ts
- Keep only non-table utilities in _utils.ts (unreachable, getFileModifiedTime)
- Move all table-related tests to _table.ts with comprehensive coverage
- Improve type safety with dedicated TableCellAlign type for cell alignment
This refactoring improves code organization by separating table-related
utilities from general utilities, following the single responsibility principle.
All tests pass and functionality remains unchanged.1 parent 348b253 commit ef631c8
10 files changed
Lines changed: 824 additions & 815 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments