feat: add json5.ts

This commit is contained in:
2026-01-09 22:35:48 +08:00
parent 3ccaa1198f
commit 0c0df4ae8c
2 changed files with 20 additions and 0 deletions

11
single-scripts/json5.ts Executable file
View 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==