Skip to content

Commit 51d0607

Browse files
authored
doc: update path documentation
1 parent b1058ce commit 51d0607

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/api/path.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ path.extname('.index.md');
209209
// Returns: '.md'
210210
```
211211

212-
A [`TypeError`][] is thrown if `path` is not a string or an instance of \[`URL`]\[].
212+
A [`TypeError`][] is thrown if `path` is not a string or an instance of [`URL`][].
213213

214214
## `path.format(pathObject)`
215215

@@ -326,7 +326,7 @@ path.isAbsolute('bar/baz'); // false
326326
path.isAbsolute('.'); // false
327327
```
328328

329-
A [`TypeError`][] is thrown if `path` is not a string or an instance of \[`URL`]\[].
329+
A [`TypeError`][] is thrown if `path` is not a string or an instance of [`URL`][].
330330

331331
## `path.join([...paths])`
332332

@@ -356,7 +356,7 @@ path.join('foo', {}, 'bar');
356356
// Throws 'TypeError: Path must be a string. Received {}'
357357
```
358358

359-
A [`TypeError`][] is thrown if any of the path segments is not a string or an instance of \[`URL`]\[].
359+
A [`TypeError`][] is thrown if any of the path segments is not a string or an instance of [`URL`][].
360360

361361
## `path.normalize(path)`
362362

@@ -412,7 +412,7 @@ path.win32.normalize('C:////temp\\\\/\\/\\/foo/bar');
412412
// Returns: 'C:\\temp\\foo\\bar'
413413
```
414414

415-
A [`TypeError`][] is thrown if `path` is not a string or an instance of \[`URL`]\[].
415+
A [`TypeError`][] is thrown if `path` is not a string or an instance of [`URL`][].
416416

417417
## `path.parse(path)`
418418

@@ -483,7 +483,7 @@ path.parse('C:\\path\\dir\\file.txt');
483483
(All spaces in the "" line should be ignored. They are purely for formatting.)
484484
```
485485

486-
A [`TypeError`][] is thrown if `path` is not a string or an instance of \[`URL`]\[].
486+
A [`TypeError`][] is thrown if `path` is not a string or an instance of [`URL`][].
487487

488488
## `path.posix`
489489

@@ -541,7 +541,7 @@ path.relative('C:\\orandea\\test\\aaa', 'C:\\orandea\\impl\\bbb');
541541
// Returns: '..\\..\\impl\\bbb'
542542
```
543543

544-
A [`TypeError`][] is thrown if either `from` or `to` is not a string or an instance of \[`URL`]\[].
544+
A [`TypeError`][] is thrown if either `from` or `to` is not a string or an instance of [`URL`][].
545545

546546
## `path.resolve([...paths])`
547547

@@ -588,7 +588,7 @@ path.resolve('wwwroot', 'static_files/png/', '../gif/image.gif');
588588
// this returns '/home/myself/node/wwwroot/static_files/gif/image.gif'
589589
```
590590

591-
A [`TypeError`][] is thrown if any of the arguments is not a string or an instance of \[`URL`]\[].
591+
A [`TypeError`][] is thrown if any of the arguments is not a string or an instance of [`URL`][].
592592

593593
## `path.sep`
594594

@@ -660,9 +660,9 @@ The API is accessible via `require('node:path').win32` or `require('node:path/wi
660660

661661
[MSDN-Rel-Path]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#fully-qualified-vs-relative-paths
662662
[`TypeError`]: errors.md#class-typeerror
663+
[`URL`]: url.md#the-whatwg-url-api
663664
[`path.parse()`]: #pathparsepath
664665
[`path.posix`]: #pathposix
665666
[`path.sep`]: #pathsep
666667
[`path.win32`]: #pathwin32
667668
[namespace-prefixed path]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#namespaces
668-
[`URL`]: url.md

0 commit comments

Comments
 (0)