feat: add hjson.ts
This commit is contained in:
@@ -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,
|
||||
|
||||
9
single-scripts/hjson.ts
Executable file
9
single-scripts/hjson.ts
Executable 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));
|
||||
|
||||
Reference in New Issue
Block a user