Skip to content

Commit

Permalink
doc: add esm example in path.md
Browse files Browse the repository at this point in the history
PR-URL: nodejs#55745
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
  • Loading branch information
RedYetiDev authored and tpoisseau committed Nov 21, 2024
1 parent be5e819 commit 52d634e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/api/path.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
The `node:path` module provides utilities for working with file and directory
paths. It can be accessed using:

```js
```cjs
const path = require('node:path');
```

```mjs
import path from 'node:path';
```

## Windows vs. POSIX

The default operation of the `node:path` module varies based on the operating
Expand Down

0 comments on commit 52d634e

Please sign in to comment.