From ef63f688afaa8a231845231ac039ab67ed4613e6 Mon Sep 17 00:00:00 2001 From: Sho Miyamoto Date: Wed, 14 Feb 2018 16:18:04 +0900 Subject: [PATCH 1/3] doc: fix a typo in util.isDeepStrictEqual --- doc/api/util.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/util.md b/doc/api/util.md index b5a3f51ad635f9..4201e7dfd2e0bf 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -627,7 +627,7 @@ added: v9.0.0 * `val2` {any} * Returns: {boolean} -Returns `true` if there is deep strict equality between `val` and `val2`. +Returns `true` if there is deep strict equality between `val1` and `val2`. Otherwise, returns `false`. See [`assert.deepStrictEqual()`][] for more information about deep strict From 1743fa8d406763c07ff8b87aa6309f433863e003 Mon Sep 17 00:00:00 2001 From: Sho Miyamoto Date: Wed, 14 Feb 2018 16:17:14 +0900 Subject: [PATCH 2/3] doc: add missing `Returns` in fs & util --- doc/api/fs.md | 16 ++++++++++++++++ doc/api/util.md | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/doc/api/fs.md b/doc/api/fs.md index 2a0ce3f8a22e54..16918da880048d 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1210,6 +1210,7 @@ changes: * `start` {integer} * `end` {integer} * `highWaterMark` {integer} +* Returns: {ReadStream} Returns a new [`ReadStream`][] object. (See [Readable Streams][]). @@ -1285,6 +1286,7 @@ changes: * `mode` {integer} * `autoClose` {boolean} * `start` {integer} +* Returns: {WriteStream} Returns a new [`WriteStream`][] object. (See [Writable Stream][]). @@ -1442,6 +1444,7 @@ changes: --> * `path` {string|Buffer|URL} +* Returns: {boolean} Synchronous version of [`fs.exists()`][]. Returns `true` if the path exists, `false` otherwise. @@ -1560,6 +1563,7 @@ added: v0.1.95 --> * `fd` {integer} +* Returns: {fs.Stats} Synchronous fstat(2). Returns an instance of [`fs.Stats`][]. @@ -1834,6 +1838,7 @@ changes: --> * `path` {string|Buffer|URL} +* Returns: {fs.Stats} Synchronous lstat(2). Returns an instance of [`fs.Stats`][]. @@ -1959,6 +1964,7 @@ added: v5.10.0 * `prefix` {string} * `options` {string|Object} * `encoding` {string} **Default:** `'utf8'` +* Returns: {string} The synchronous version of [`fs.mkdtemp()`][]. Returns the created folder path. @@ -2083,6 +2089,7 @@ changes: * `path` {string|Buffer|URL} * `flags` {string|number} * `mode` {integer} **Default:** `0o666` +* Returns: {number} Synchronous version of [`fs.open()`][]. Returns an integer representing the file descriptor. @@ -2173,6 +2180,7 @@ changes: * `path` {string|Buffer|URL} * `options` {string|Object} * `encoding` {string} **Default:** `'utf8'` +* Returns: {Array} An array of filenames Synchronous readdir(3). Returns an array of filenames excluding `'.'` and `'..'`. @@ -2273,6 +2281,7 @@ changes: * `options` {Object|string} * `encoding` {string|null} **Default:** `null` * `flag` {string} **Default:** `'r'` +* Returns: {string|Buffer} Synchronous version of [`fs.readFile()`][]. Returns the contents of the `path`. @@ -2333,6 +2342,7 @@ changes: * `path` {string|Buffer|URL} * `options` {string|Object} * `encoding` {string} **Default:** `'utf8'` +* Returns: {string|Buffer} Synchronous readlink(2). Returns the symbolic link's string value. @@ -2355,6 +2365,7 @@ changes: * `offset` {integer} * `length` {integer} * `position` {integer} +* Returns: {number} Synchronous version of [`fs.read()`][]. Returns the number of `bytesRead`. @@ -2465,6 +2476,7 @@ changes: * `path` {string|Buffer|URL} * `options` {string|Object} * `encoding` {string} **Default:** `'utf8'` +* Returns: {string|Buffer} Synchronously computes the canonical pathname by resolving `.`, `..` and symbolic links. @@ -2495,6 +2507,7 @@ added: v9.2.0 * `path` {string|Buffer|URL} * `options` {string|Object} * `encoding` {string} **Default:** `'utf8'` +* Returns: {string|Buffer} Synchronous realpath(3). @@ -2632,6 +2645,7 @@ changes: --> * `path` {string|Buffer|URL} +* Returns: {fs.Stats} Synchronous stat(2). Returns an instance of [`fs.Stats`][]. @@ -3197,6 +3211,7 @@ changes: * `offset` {integer} * `length` {integer} * `position` {integer} +* Returns: {number} ## fs.writeSync(fd, string[, position[, encoding]])