From f7f0bb86a6ccf3b6e1970c8749b83e828578e673 Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Fri, 4 Mar 2022 20:14:38 +0200 Subject: [PATCH] add message to log operator --- src/lib/utils/functions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/utils/functions.ts b/src/lib/utils/functions.ts index 3791217..4730d65 100644 --- a/src/lib/utils/functions.ts +++ b/src/lib/utils/functions.ts @@ -20,8 +20,8 @@ export function humanize(value: string, lowercase = true): string { return words.map(capitalize).join(' '); } -export function log(): MonoTypeOperatorFunction { - return tap(res => console.log(`%c[${moment().format('HH:mm:ss.SSS')}]`, 'color: yellow;', res)); +export function log(message = ''): MonoTypeOperatorFunction { + return tap(res => console.log(`%c[${moment().format('HH:mm:ss.SSS')}] ${message}`, 'color: yellow;', res)); } export function toNumber(str: string): number {