Files
ts-scripts/single-scripts/encodeUriComponent.ts
2026-01-21 23:28:36 +08:00

12 lines
411 B
TypeScript
Executable File

#!/usr/bin/env runts --
import {toArrayBuffer} from "https://deno.land/std@0.203.0/streams/mod.ts";
const input = await toArrayBuffer(Deno.stdin.readable);
const encoded = encodeURIComponent(new TextDecoder().decode(input));
console.log(encoded);
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260121T232516+08:00.MEYCIQDACv34O4dNEf0su2wk
// Lv4+hfZyvbDLPHF8utf2jM3VoAIhAJgrJW75gxZX9Che75cWQN/XB9qvA3MmeAaa9Oo4WWNX