export function setConfig()

in src/config/config.ts [60:69]


export function setConfig(newConfig: Config, templateId: TemplateId = getActiveTemplateId()): void {
  if (JSON.stringify(newConfig) === JSON.stringify(getDefaultConfig(templateId))) {
    localStorage.removeItem(localStorageConfigKey(templateId));
  } else {
    localStorage.setItem(localStorageConfigKey(templateId), JSON.stringify(newConfig));
  }
  if (getActiveTemplateId() === templateId) {
    activeConfig$.next(getConfig());
  }
}