function readLines
readLines(): AsyncIterableIterator<string>Deprecated
(will be removed after 1.0.0) Use the Web Streams API instead.
Read strings line-by-line from a Reader.
Examples
Example 1
Example 1
import { readLines } from "@std/io/read_lines"; import * as path from "@std/path"; const filename = path.join(Deno.cwd(), "std/io/README.md"); let fileReader = await Deno.open(filename); for await (let line of readLines(fileReader)) { console.log(line); }
Parameters
Return Type
AsyncIterableIterator<string>