diff --git a/script-meta-v2.json b/script-meta-v2.json index 6ecfe22..635eb70 100644 --- a/script-meta-v2.json +++ b/script-meta-v2.json @@ -24,6 +24,15 @@ "publish_time": 1737272626138, "update_time": 1737272626138 }, + "hjson.ts": { + "script_name": "hjson.ts", + "script_length": 292, + "script_sha256": "953352a261a8a98311812e679ad0abd851b5012ce7756d9681110b3972bc16aa", + "script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/hjson.ts", + "single_script_file": true, + "publish_time": 1737375737613, + "update_time": 1737375737613 + }, "kpxcenv.ts": { "script_name": "kpxcenv.ts", "script_length": 3551, diff --git a/single-scripts/hjson.ts b/single-scripts/hjson.ts new file mode 100755 index 0000000..c35c799 --- /dev/null +++ b/single-scripts/hjson.ts @@ -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)); +