📅  最后修改于: 2022-03-11 14:48:21.086000             🧑  作者: Mango
async function prompt(message: string = "") {
const buf = new Uint8Array(1024);
await Deno.stdout.write(new TextEncoder().encode(message + ": "));
const n = await Deno.stdin.read(buf);
return new TextDecoder().decode(buf.subarray(0, n)).trim();
}