From 41e93e90b4610476b3110c91da1fea356baad323 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Wed, 14 Aug 2019 00:15:10 -0500 Subject: [PATCH] fs: add default options Fixes: https://github.com/nodejs/node/issues/29113 --- lib/fs.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index baba33a6a2fa8b..2ca3bdf21acab2 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -796,7 +796,7 @@ function readdirSync(path, options) { return options.withFileTypes ? getDirents(path, result) : result; } -function fstat(fd, options, callback) { +function fstat(fd, options = { bigint: false }, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -807,7 +807,7 @@ function fstat(fd, options, callback) { binding.fstat(fd, options.bigint, req); } -function lstat(path, options, callback) { +function lstat(path, options = { bigint: false }, callback) { if (typeof options === 'function') { callback = options; options = {}; @@ -819,7 +819,7 @@ function lstat(path, options, callback) { binding.lstat(pathModule.toNamespacedPath(path), options.bigint, req); } -function stat(path, options, callback) { +function stat(path, options = { bigint: false }, callback) { if (typeof options === 'function') { callback = options; options = {};