From ef908edc122a4682149a37d77c82d2841f975c97 Mon Sep 17 00:00:00 2001 From: Patrick Skowronek Date: Wed, 30 Oct 2024 10:52:02 +0100 Subject: [PATCH] chore: formating --- packages/lib/src/stores/datarequests.ts | 40 ++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/lib/src/stores/datarequests.ts b/packages/lib/src/stores/datarequests.ts index 7f144bc..5259e4d 100644 --- a/packages/lib/src/stores/datarequests.ts +++ b/packages/lib/src/stores/datarequests.ts @@ -34,30 +34,30 @@ export const buildHumanReadableRecursively = ( queryLayer.children.forEach((child: AstElement, index: number): void => { if (child !== null) { - if ("type" in child && "value" in child && "key" in child) { - if (typeof child.value === "string") { - humanReadableQuery += `(${child.key} ${child.type} ${child.value})`; + if ("type" in child && "value" in child && "key" in child) { + if (typeof child.value === "string") { + humanReadableQuery += `(${child.key} ${child.type} ${child.value})`; + } + if ( + typeof child.value === "object" && + "min" in child.value && + "max" in child.value + ) { + humanReadableQuery += `(${child.key} ${child.type} ${child.value.min} and ${child.value.max})`; + } } - if ( - typeof child.value === "object" && - "min" in child.value && - "max" in child.value - ) { - humanReadableQuery += `(${child.key} ${child.type} ${child.value.min} and ${child.value.max})`; - } - } - humanReadableQuery = buildHumanReadableRecursively( - child, - humanReadableQuery, - ); + humanReadableQuery = buildHumanReadableRecursively( + child, + humanReadableQuery, + ); - if (index === queryLayer.children.length - 1) { - } - if (index < queryLayer.children.length - 1) { - humanReadableQuery += ` ${queryLayer.operand} `; + if (index === queryLayer.children.length - 1) { + } + if (index < queryLayer.children.length - 1) { + humanReadableQuery += ` ${queryLayer.operand} `; + } } - } }); if (queryLayer.children.length > 1) {