UNPKG

@yoroi/common

Version:

The Common package of Yoroi SDK

13 lines (10 loc) 313 B
import {App} from '@yoroi/types' export function toLoggerMetadata( metadata: App.Logger.Metadata, ): App.Logger.Metadata { return Object.keys(metadata).reduce((acc, key) => { let value = metadata[key] if (value instanceof Error) value = value.toString() return {...acc, [key]: value} }, {}) }