Files
Homarr/src/tools/config/getConfig.ts

10 lines
339 B
TypeScript
Raw Normal View History

2022-12-11 14:11:25 +01:00
import { ConfigType } from '../../types/config';
import { configExists } from './configExists';
import { getFallbackConfig } from './getFallbackConfig';
import { readConfig } from './readConfig';
export const getConfig = (name: string): ConfigType => {
if (!configExists(name)) return getFallbackConfig();
return readConfig(name);
};