grab-api-sentinel-mocks/normalize-config.js

9 lines
348 B
JavaScript

import { config } from "./config";
export const normalize_configs = (default_token, default_base_url, default_download_dir) => {
if(config.base_url === "") {config.base_url = default_base_url};
if(config.token === "") {config.default_token = default_token};
if(config.downloadDir === "") {config.downloadDir = default_download_dir}
}