From 5d02141e6b92fca770efd7c78d70e8b955b2ace7 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 17 Dec 2023 16:19:58 +0100 Subject: [PATCH] fix: better logging of objects (#202) --- mod.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mod.ts b/mod.ts index 7ced3e7..42f230a 100644 --- a/mod.ts +++ b/mod.ts @@ -766,7 +766,14 @@ function build$FromState(state: $State { + const typeofD = typeof d; + if (typeofD !== "object" && typeofD !== "undefined") { + return d; + } else { + return Deno.inspect(d, { colors: true }); + } + }).join(" "); if (state.indentLevel.value === 0) { return combinedText; } else {