diff options
Diffstat (limited to 'client-web/scripts/reformat_json.ts')
-rw-r--r-- | client-web/scripts/reformat_json.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/client-web/scripts/reformat_json.ts b/client-web/scripts/reformat_json.ts new file mode 100644 index 0000000..35fc1dd --- /dev/null +++ b/client-web/scripts/reformat_json.ts @@ -0,0 +1,16 @@ + + + + +const decoder = new TextDecoder(); +let text = "" +for await (const chunk of Deno.stdin.readable) { + text += decoder.decode(chunk); +} + +for (const ob of text.split("\n")) { + if (!ob.length) continue + console.log(JSON.stringify(JSON.parse(ob), null, 4)); +} + + |