Asynchronously read lines from standard input (fd 0)
for await (const line of console) {
console.log(line);
}
Search the reference...
/
method
Console.[Symbol.asyncIterator][Symbol.asyncIterator](): AsyncIterableIteratorstring>;Asynchronously read lines from standard input (fd 0)
for await (const line of console) {
console.log(line);
}
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →