MCPcopy
hub / github.com/opentrace/opentrace / decodeSvgContent

Function decodeSvgContent

ui/src/appComponents/NodeDetailsPanel.tsx:172–179  ·  view source on GitHub ↗

Decode SVG content to a raw XML string regardless of encoding.

(source: NodeSourceResponse)

Source from the content-addressed store, hash-verified

170
171/** Decode SVG content to a raw XML string regardless of encoding. */
172function decodeSvgContent(source: NodeSourceResponse): string {
173 if (!source.binary) return source.content;
174 try {
175 return atob(source.content);
176 } catch {
177 return source.content;
178 }
179}
180
181export default function NodeDetailsPanel({
182 node,

Callers 1

NodeDetailsPanelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected