import formats from '$lib/common/supportedFormats.json'; import winston from 'winston'; export const logger = winston.createLogger({ level: 'debug', format: winston.format.json(), transports: [new winston.transports.Console()] }); const formatMime = new Map(Object.entries(formats)); export const isURLValid = (url: string) => { try { new URL(url); } catch { return false; } return true; }; export const mimeTypeMap = formatMime;