/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/specs/node/node_debug/main.mjs
14 строк
440 B
Satya Rohith
fix(ext/node): support NODE_DEBUG env (#23583)
29 апр 2024, 12:36
Не верифицирован
29 апр 2024, 12:36
b844406
Код
Авторство
О чём код?
import { createReadStream } from "node:fs"; import path from "node:path"; const filePath = path.join(import.meta.dirname, "hello.txt"); const readableStream = createReadStream(filePath); readableStream.on("data", (chunk) => { console.log(chunk.toString()); }); readableStream.on("end", () => { console.log("Finished reading the file"); }); readableStream.on("error", (error) => { console.error("Error reading the file:", error); });