All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 1m58s
21 lines
352 B
Svelte
21 lines
352 B
Svelte
<script lang="ts">
|
|
import type { Graph } from "$lib/types";
|
|
|
|
const { graph }: { graph: Graph } = $props();
|
|
|
|
function convert(g: Graph): string {
|
|
return JSON.stringify(
|
|
{
|
|
...g,
|
|
nodes: g.nodes.map((n: any) => ({ ...n, tmp: undefined })),
|
|
},
|
|
null,
|
|
2,
|
|
);
|
|
}
|
|
</script>
|
|
|
|
<pre>
|
|
{convert(graph)}
|
|
</pre>
|