From f1af2224c9c5f68b6bf0be525078e894163cf9ea Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Thu, 24 Aug 2023 00:03:29 +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. --- 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 114a51c15dc5d6..33be761491a9b7 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])`