it's cool that we have format
All checks were successful
Bump deps (only minor versions) / ci (push) Successful in 18s
All checks were successful
Bump deps (only minor versions) / ci (push) Successful in 18s
This commit is contained in:
parent
760812c692
commit
652208aa57
6 changed files with 69 additions and 60 deletions
|
@ -2,18 +2,18 @@ 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()],
|
||||
level: 'debug',
|
||||
format: winston.format.json(),
|
||||
transports: [new winston.transports.Console()]
|
||||
});
|
||||
const formatMime = new Map(Object.entries(formats))
|
||||
const formatMime = new Map(Object.entries(formats));
|
||||
export const isURLValid = (url: string) => {
|
||||
try {
|
||||
new URL(url)
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
try {
|
||||
new URL(url);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
export const mimeTypeMap = formatMime;
|
||||
return true;
|
||||
};
|
||||
export const mimeTypeMap = formatMime;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue