From fe027da1f0aa8d63ed9a2c8298a45946bc674fff Mon Sep 17 00:00:00 2001 From: LiviaMedeiros Date: Wed, 18 May 2022 01:37:03 +0800 Subject: [PATCH] fs: add trailing commas PR-URL: https://github.com/nodejs/node/pull/43127 Co-authored-by: Antoine du Hamel Reviewed-By: Antoine du Hamel Reviewed-By: Akhil Marsonya --- lib/fs.js | 2 +- lib/internal/fs/promises.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 69198c7811d3ed..912ca0503d5a25 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -897,7 +897,7 @@ function writeSync(fd, buffer, offsetOrOptions, length, position) { ({ offset = 0, length = buffer.byteLength - offset, - position = null + position = null, } = offsetOrOptions ?? ObjectCreate(null)); } if (position === undefined) diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index dfd16667f73877..c3c5874453a8b6 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -516,7 +516,7 @@ async function read(handle, bufferOrParams, offset, length, position) { buffer = Buffer.alloc(16384), offset = 0, length = buffer.byteLength - offset, - position = null + position = null, } = bufferOrParams ?? ObjectCreate(null)); validateBuffer(buffer); @@ -527,7 +527,7 @@ async function read(handle, bufferOrParams, offset, length, position) { ({ offset = 0, length = buffer.byteLength - offset, - position = null + position = null, } = offset); } @@ -579,7 +579,7 @@ async function write(handle, buffer, offsetOrOptions, length, position) { ({ offset = 0, length = buffer.byteLength - offset, - position = null + position = null, } = offsetOrOptions ?? ObjectCreate(null)); }