Setup basic terminal output for Bun runtime
This commit is contained in:
parent
f238b162f6
commit
8155f4dc73
@ -5,4 +5,10 @@ export async function* inputLoop() {
|
|||||||
for await (const chunk of Bun.stdin.stream()) {
|
for await (const chunk of Bun.stdin.stream()) {
|
||||||
yield chunk;
|
yield chunk;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function write(s: string): Promise<void> {
|
||||||
|
const buffer = new TextEncoder().encode(s);
|
||||||
|
|
||||||
|
await Bun.write(Bun.stdout, buffer);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user