MCPcopy Create free account
hub / github.com/ZingerLittleBee/ServerBee / getMenuColumnWidths

Function getMenuColumnWidths

scripts/make-menu.ts:479–482  ·  view source on GitHub ↗
(commands: CommandDefinition[])

Source from the content-addressed store, hash-verified

477const getFeaturedCommands = (): CommandDefinition[] => COMMANDS.filter((command) => command.featured)
478
479export const getMenuColumnWidths = (commands: CommandDefinition[]): MenuColumnWidths => ({
480 categoryWidth: Math.max(...commands.map((command) => command.category.length)),
481 nameWidth: Math.max(...commands.map((command) => command.name.length))
482})
483
484export const orderCommandsForMenu = (
485 commands: CommandDefinition[],

Callers 2

make-menu.test.tsFile · 0.90
openMenuFunction · 0.85

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected