MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / formatCode

Function formatCode

apps/web/ui/Message/BlockCode/utilities.ts:22–27  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

20}
21
22export function formatCode(code: string): string {
23 if (isJSON(code)) {
24 return formatJSON(code);
25 }
26 return code;
27}
28
29function formatJSON(code: string): string {
30 try {

Callers 2

utilities.test.tsFile · 0.90
BlockCodeFunction · 0.90

Calls 2

isJSONFunction · 0.85
formatJSONFunction · 0.85

Tested by

no test coverage detected