feat: add hjson.ts

This commit is contained in:
2025-01-20 20:25:08 +08:00
parent 89c81b75c4
commit 3645ac9f32
2 changed files with 18 additions and 0 deletions

9
single-scripts/hjson.ts Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env -S deno run --allow-env
import hjson from "npm:hjson";
import { toArrayBuffer } from "https://deno.land/std@0.203.0/streams/mod.ts";
const input = new TextDecoder().decode(await toArrayBuffer(Deno.stdin.readable));
console.log(JSON.stringify(hjson.parse(input), null, 4));