MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / exportFilename

Function exportFilename

ui/src/lib/export-svg.ts:969–977  ·  view source on GitHub ↗
(kind: 'flow' | 'map', label: string)

Source from the content-addressed store, hash-verified

967 * adds one, because the same picture goes out as both `.svg` and `.png`.
968 */
969export function exportFilename(kind: 'flow' | 'map', label: string): string {
970 const slug = label
971 .toLowerCase()
972 .replace(/[^a-z0-9]+/g, '-')
973 .replace(/^-+|-+$/g, '')
974 .slice(0, 60)
975 .replace(/-+$/g, '');
976 return `codegraph-${kind}${slug ? `-${slug}` : ''}`;
977}
978
979export { CARD_WIDTH };

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected