@@ -236,8 +236,8 @@ On Windows:
236
236
237
237
``` js
238
238
path .format ({
239
- dir : " C:\\ path\\ dir" ,
240
- base : " file.txt"
239
+ dir: ' C:\\ path\\ dir' ,
240
+ base: ' file.txt'
241
241
});
242
242
// Returns: 'C:\\path\\dir\\file.txt'
243
243
```
@@ -299,7 +299,7 @@ path.join('/foo', 'bar', 'baz/asdf', 'quux', '..')
299
299
// Returns: '/foo/bar/baz/asdf'
300
300
301
301
path .join (' foo' , {}, ' bar' )
302
- // throws TypeError: Arguments to path.join must be strings
302
+ // throws ' TypeError: Path must be a string. Received {}'
303
303
```
304
304
305
305
A [ ` TypeError ` ] [ ] is thrown if any of the path segments is not a string.
@@ -332,7 +332,7 @@ path.normalize('/foo/bar//baz/asdf/quux/..')
332
332
On Windows:
333
333
334
334
``` js
335
- path .normalize (' C:\\ temp\\\\ foo\\ bar\\ ..\\ ' );
335
+ path .normalize (' C:\\ temp\\\\ foo\\ bar\\ ..\\ ' )
336
336
// Returns: 'C:\\temp\\foo\\'
337
337
```
338
338
@@ -362,13 +362,11 @@ For example on POSIX:
362
362
``` js
363
363
path .parse (' /home/user/dir/file.txt' )
364
364
// 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' }
372
370
```
373
371
374
372
``` text
@@ -386,13 +384,11 @@ On Windows:
386
384
``` js
387
385
path .parse (' C:\\ path\\ dir\\ file.txt' )
388
386
// 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' }
396
392
```
397
393
398
394
``` text
0 commit comments