Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
22
export
function
formatCode(code: string): string {
23
if
(isJSON(code)) {
24
return
formatJSON(code);
25
}
26
return
code;
27
}
28
29
function
formatJSON(code: string): string {
30
try {
Callers
2
utilities.test.ts
File · 0.90
BlockCode
Function · 0.90
Calls
2
isJSON
Function · 0.85
formatJSON
Function · 0.85
Tested by
no test coverage detected