import { LogParameters } from "../types/BrowserLogger"; export const isObject = (value: unknown): boolean => { return Boolean(value) && !Array.isArray(value) && typeof value === 'object'; }; export const isString = (value: unknown): boolean => { return typeof value === 'string'; }; export const resolveLogArguments = (args: unknown[]): LogParameters => { let message; let properties; const [arg1, arg2] = args; if (isString(arg1)) { message = arg1 as string; } if (arg2) { if (isObject(arg2)) { properties = { ...(arg2 as object), }; } } return [message, properties]; };