Skip to content

Commit 2e78122

Browse files
committed
docs: moved import to top and updated authors
1 parent b435542 commit 2e78122

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/site/pages/en/learn/manipulating-files/reading-files-with-nodejs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Reading files with Node.js
33
layout: learn
4-
authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, clean99
4+
authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, clean99, benhalverson
55
---
66

77
# Reading files with Node.js
@@ -92,10 +92,10 @@ In this case, a better option is to read the file content using streams.
9292
```mjs
9393
import fs from 'fs';
9494
import path from 'path';
95+
import { pipeline } from 'node:stream/promises';
9596

9697
const fileUrl = 'https://www.gutenberg.org/files/2701/2701-0.txt';
9798
const outputFilePath = path.join(process.cwd(), 'mobey.md');
98-
import { pipeline } from 'node:stream/promises';
9999

100100
async function downloadFile(url, outoutPath) {
101101
const response = await fetch(url);

0 commit comments

Comments
 (0)