From fc0ee0142d993814c76a306c5983de24d972b474 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Sat, 26 Aug 2023 00:23:15 +0900 Subject: [PATCH] fs: remove redundant code in readableWebStream() Remove redundant code by moving it to outside of `if/else`. Plus, make `options` optional in doc. PR-URL: https://github.com/nodejs/node/pull/49298 Reviewed-By: Debadree Chatterjee Reviewed-By: Luigi Pinca --- doc/api/fs.md | 2 +- lib/internal/fs/promises.js | 23 ++++++++--------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 114a51c15dc5d66..33be761491a9b75 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -446,7 +446,7 @@ Reads data from the file and stores that in the given buffer. If the file is not modified concurrently, the end-of-file is reached when the number of bytes read is zero. -#### `filehandle.readableWebStream(options)` +#### `filehandle.readableWebStream([options])`