Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: use node prefix in fs/promises mkdir examples
Signed-off-by: Tierney Cyren <hello@bnb.im>
  • Loading branch information
bnb committed Jun 11, 2022
commit 90e60a2bea3190b0328922e22e46c9b797954997
6 changes: 3 additions & 3 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1021,8 +1021,8 @@ try {
```

```cjs
const { mkdir } = require('fs/promises');
const { resolve } = require('path');
const { mkdir } = require('node:fs/promises');
const { resolve } = require('node:path');

async function makeDirectory() {
try {
Expand Down Expand Up @@ -1068,7 +1068,7 @@ The optional `options` argument can be a string specifying an encoding, or an
object with an `encoding` property specifying the character encoding to use.

```mjs
import { mkdtemp } from 'fs/promises';
import { mkdtemp } from 'node:fs/promises';

try {
await mkdtemp(path.join(os.tmpdir(), 'foo-'));
Expand Down