Skip to content

Commit 3e8fcd3

Browse files
authored
Merge pull request #117 from Adam-Elmi/fix/fs-readfile-async-await
Fix incorrect usage of fs.readFile with async/await
2 parents 75283c3 + b249da2 commit 3e8fcd3

File tree

2 files changed

+5667
-4313
lines changed

2 files changed

+5667
-4313
lines changed

docs/cheatsheet/directory-files.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ To interact with the file system in JavaScript, you typically use the built-in `
3131
Here's a simple example of reading a file using the `fs` module:
3232

3333
```javascript
34-
const fs = require('fs');
34+
const fs = require('fs').promises;
3535

3636
async function readFileAsync() {
3737
try {

0 commit comments

Comments
 (0)