dl.emersa.it/src/lib/server/helpers.ts
0d0 57d2adbdbc
All checks were successful
Bump deps (only minor versions) / ci (push) Successful in 30s
remove useless log
2025-04-19 18:50:31 +02:00

19 lines
443 B
TypeScript

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;