Skip to content

Commit

Permalink
Simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Oct 23, 2024
1 parent 7370cf5 commit 2ea671a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions node-src/lib/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] =>
Expand Down

0 comments on commit 2ea671a

Please sign in to comment.