From 2ea671ac66e912b8b17b8b331fdc1a4460ac0fdb Mon Sep 17 00:00:00 2001 From: Gert Hengeveld Date: Wed, 23 Oct 2024 11:23:03 +0200 Subject: [PATCH] Simplification --- node-src/lib/log.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/node-src/lib/log.ts b/node-src/lib/log.ts index 8e86444b7..ffa999cab 100644 --- a/node-src/lib/log.ts +++ b/node-src/lib/log.ts @@ -19,8 +19,10 @@ const DEFAULT_LEVEL = 'info'; const handleRejection = (reason: string) => console.error('Unhandled promise rejection:', reason); process.on('unhandledRejection', handleRejection); -const isPrintable = (value: any, type = typeof value) => - type === 'string' || type === 'number' || type === 'boolean'; +const isPrintable = (value: any) => { + const type = typeof value; + return type === 'string' || type === 'number' || type === 'boolean'; +}; // Omits any JSON metadata, returning only the message string const logInteractive = (args: any[]): string[] =>