Files
bun.sh/test/js/bun/console/console-iterator-run-2.ts
dave caruso 9976e3f528 fix(runtime): make most globals configurable/deletable, allow resuming the console iterator (#5216)
* Fix #5177

* Fix #5175

* make most globals deletable/overridable

* not done

* cool

* a

* done

* fix test

* oops

* yippee
2023-09-13 21:39:36 -07:00

17 lines
303 B
TypeScript

async function readInput() {
let items = [];
for await (const line of console) {
if (line == "break") {
break;
}
items.push(line);
}
return items;
}
const a = await readInput();
console.write(JSON.stringify(a));
const b = await readInput();
console.write(JSON.stringify(b));