| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0f757bc commit 68c5ee4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -60,7 +60,7 @@ Promise-based operations return a `Promise` that is resolved when the | |||
| 60 | 60 | asynchronous operation is complete. | |
| 61 | 61 | ||
| 62 | 62 | ```js | |
| 63 | - const fs = require('fs/promises'); | ||
| 63 | + const fs = require('fs').promises; | ||
| 64 | 64 | ||
| 65 | 65 | (async function(path) { | |
| 66 | 66 | try { | |
@@ -106,7 +106,7 @@ fs.rename('/tmp/hello', '/tmp/world', (err) => { | |||
| 106 | 106 | Or, use the promise-based API: | |
| 107 | 107 | ||
| 108 | 108 | ```js | |
| 109 | - const fs = require('fs/promises'); | ||
| 109 | + const fs = require('fs').promises; | ||
| 110 | 110 | ||
| 111 | 111 | (async function(from, to) { | |
| 112 | 112 | try { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments