From b8f102c3637a8b404dad6ac6fdfce14907472c79 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 ceb0e189678140..89883db955cb0e 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -890,7 +890,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 7b7377292d55b2..6f4ac95c44f2a1 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -464,7 +464,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); @@ -475,7 +475,7 @@ async function read(handle, bufferOrParams, offset, length, position) { ({ offset = 0, length = buffer.byteLength - offset, - position = null + position = null, } = offset); } @@ -527,7 +527,7 @@ async function write(handle, buffer, offsetOrOptions, length, position) { ({ offset = 0, length = buffer.byteLength - offset, - position = null + position = null, } = offsetOrOptions ?? ObjectCreate(null)); }