From e2657b7c3db7f3942f90042493f63444fae68d43 Mon Sep 17 00:00:00 2001 From: Ayoub-Mabrouk Date: Sun, 3 Nov 2024 21:42:03 +0100 Subject: [PATCH] refactor: simplify req.path getter - Removed redundant function name from the req.path getter for improved readability. The function now directly utilizes the concise function expression. --- lib/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/request.js b/lib/request.js index 372a9915e9..78dc2b8919 100644 --- a/lib/request.js +++ b/lib/request.js @@ -388,7 +388,7 @@ defineGetter(req, 'subdomains', function subdomains() { * @public */ -defineGetter(req, 'path', function path() { +defineGetter(req, 'path', function() { return parse(this).pathname; });