From 10b2405707bcc110f9e72737b65d14296235ea3d Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Mon, 6 Jul 2015 19:40:46 +0000 Subject: [PATCH] Reworded path strings in Notes --- doc/api/path.markdown | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/api/path.markdown b/doc/api/path.markdown index 93dce0d5fe06e9..08cc9223af3e06 100644 --- a/doc/api/path.markdown +++ b/doc/api/path.markdown @@ -22,8 +22,8 @@ Example: // returns '/foo/bar/baz/asdf' -*Note:* If the path is a zero-length string then the current working directory - will be returned. +*Note:* If the path string passed as argument is a zero-length string then the + current working directory will be returned. ## path.join([path1][, path2][, ...]) @@ -42,8 +42,8 @@ Example: // throws exception TypeError: Arguments to path.join must be strings -*Note:* If the joined path is a zero-length string then the current working - directory will be returned. +*Note:* If the joined path string is a zero-length string then the current + working directory will be returned. ## path.resolve([from ...], to) @@ -84,8 +84,8 @@ Examples: // if currently in /home/myself/iojs, it returns '/home/myself/iojs/wwwroot/static_files/gif/image.gif' -*Note:* If the path is a zero-length string then the current working directory - will be used. +*Note:* If the arguments to `resolve` are zero-length strings then the current + working directory will be used instead of them. ## path.isAbsolute(path) @@ -106,7 +106,9 @@ Windows examples: path.isAbsolute('bar\\baz') // false path.isAbsolute('.') // false -*Note:* If the path is a zero-length string then `false` will be returned. +*Note:* If the path string passed as parameter is a zero-length string, + unlike other path module functions, zero-length string will be used + as-is and `false` will be returned. ## path.relative(from, to) @@ -128,9 +130,9 @@ Examples: // returns '../../impl/bbb' -*Note:* If any of the paths passed are zero-length strings then the current - working directory will be used instead. If both the paths are the same - then a zero-length string will be returned. +*Note:* If the arguments to `relative` are zero-length strings then the current + working directory will be used instead of them. If both the paths are + the same then a zero-length string will be returned. ## path.dirname(p)