From 69b7f91a921fb59a95baa09e6286b04f82c65742 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 711ed4a86da6ed..f0ab94b8b9dfbd 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -444,7 +444,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])`