doc: fix mistake in path.relative

The docs implied that the parameters `from` and `to` are invalid only
if neither of them is a string; in fact, they are invalid as soon as one
of them is not a string.

PR-URL: https://github.com/nodejs/node/pull/13912
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Cai <davidcai1993@yahoo.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
This commit is contained in:
Tobias Nießen 2017-06-25 21:31:54 +02:00
parent 23b3bbf506
commit 2ff23c5622

View File

@ -466,7 +466,7 @@ path.relative('C:\\orandea\\test\\aaa', 'C:\\orandea\\impl\\bbb');
// Returns: '..\\..\\impl\\bbb'
```
A [`TypeError`][] is thrown if neither `from` nor `to` is a string.
A [`TypeError`][] is thrown if either `from` or `to` is not a string.
## path.resolve([...paths])
<!-- YAML