From 43fdc70d0641acbbad0c8ebaa95da4d69c9458b0 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Mon, 28 Oct 2024 12:02:19 -0700 Subject: [PATCH] Fix lint issues --- src/core/operations/ExtractURI.mjs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/core/operations/ExtractURI.mjs b/src/core/operations/ExtractURI.mjs index 51097175c..f2751244b 100644 --- a/src/core/operations/ExtractURI.mjs +++ b/src/core/operations/ExtractURI.mjs @@ -34,20 +34,27 @@ class ExtractURI extends Operation { const uri = new URL(input); const pieces = {}; // Straight copy some attributes - ['protocol', 'hostname', 'port', 'username', 'password', 'pathname', 'hash' - ].forEach((name) => { - if (uri[name]) pieces[name] = uri[name]; + [ + "hash", + "hostname", + "password", + "pathname", + "port", + "protocol", + "username" + ].forEach((name) => { + if (uri[name]) pieces[name] = uri[name]; }); // Now handle query params const params = uri.searchParams; if (params.size) { - pieces['query'] = {}; + pieces.query = {}; for (const name of params.keys()) { const values = params.getAll(name); if (values.length > 1) { - pieces['query'][name] = values; + pieces.query[name] = values; } else { - pieces['query'][name] = values[0]; + pieces.query[name] = values[0]; } } }