feat: add json5.ts
This commit is contained in:
@@ -59,6 +59,15 @@
|
||||
"publish_time": 1745036734128,
|
||||
"update_time": 1750472965160
|
||||
},
|
||||
"json5.ts": {
|
||||
"script_name": "json5.ts",
|
||||
"script_length": 449,
|
||||
"script_sha256": "b81ddc5b9f6f33df3521bda5f85e6378751356f104817d64b18272f839befbbf",
|
||||
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/json5.ts",
|
||||
"single_script_file": true,
|
||||
"publish_time": 1767969331870,
|
||||
"update_time": 1767969331870
|
||||
},
|
||||
"kpxcenv.ts": {
|
||||
"script_name": "kpxcenv.ts",
|
||||
"script_length": 3716,
|
||||
|
||||
11
single-scripts/json5.ts
Executable file
11
single-scripts/json5.ts
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env runts -- --allow-env
|
||||
|
||||
import josn5 from "npm:json5";
|
||||
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(josn5.parse(input), null, 4));
|
||||
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260109T223356+08:00.MEQCIFVTrvVoTLkQgqdF+reR
|
||||
// O3fqk6XmeW4hNo/bmUqCpeYFAiBpyK4W7trjpLpV07N2Xb9T+11ok+mn+9qcPV61e3IoHw==
|
||||
Reference in New Issue
Block a user