@@ -236,8 +236,8 @@ On Windows:
236236
237237``` js
238238path .format ({
239- dir : " C:\\ path\\ dir" ,
240- base : " file.txt"
239+ dir: ' C:\\ path\\ dir' ,
240+ base: ' file.txt'
241241});
242242// Returns: 'C:\\path\\dir\\file.txt'
243243```
@@ -299,7 +299,7 @@ path.join('/foo', 'bar', 'baz/asdf', 'quux', '..')
299299// Returns: '/foo/bar/baz/asdf'
300300
301301path .join (' foo' , {}, ' bar' )
302- // throws TypeError: Arguments to path.join must be strings
302+ // throws ' TypeError: Path must be a string. Received {}'
303303```
304304
305305A [ ` TypeError ` ] [ ] is thrown if any of the path segments is not a string.
@@ -332,7 +332,7 @@ path.normalize('/foo/bar//baz/asdf/quux/..')
332332On Windows:
333333
334334``` js
335- path .normalize (' C:\\ temp\\\\ foo\\ bar\\ ..\\ ' );
335+ path .normalize (' C:\\ temp\\\\ foo\\ bar\\ ..\\ ' )
336336// Returns: 'C:\\temp\\foo\\'
337337```
338338
@@ -362,13 +362,11 @@ For example on POSIX:
362362``` js
363363path .parse (' /home/user/dir/file.txt' )
364364// Returns:
365- // {
366- // root : "/",
367- // dir : "/home/user/dir",
368- // base : "file.txt",
369- // ext : ".txt",
370- // name : "file"
371- // }
365+ // { root: '/',
366+ // dir: '/home/user/dir',
367+ // base: 'file.txt',
368+ // ext: '.txt',
369+ // name: 'file' }
372370```
373371
374372``` text
@@ -386,13 +384,11 @@ On Windows:
386384``` js
387385path .parse (' C:\\ path\\ dir\\ file.txt' )
388386// Returns:
389- // {
390- // root : "C:\\",
391- // dir : "C:\\path\\dir",
392- // base : "file.txt",
393- // ext : ".txt",
394- // name : "file"
395- // }
387+ // { root: 'C:\\',
388+ // dir: 'C:\\path\\dir',
389+ // base: 'file.txt',
390+ // ext: '.txt',
391+ // name: 'file' }
396392```
397393
398394``` text
0 commit comments