Skip to content

Module: config ​

Variables ​

defaultConfig ​

β€’ Const defaultConfig: MermaidConfig

Defined in ​

config.ts:8

Functions ​

addDirective ​

β–Έ addDirective(directive): void

Pushes in a directive to the configuration

Parameters ​

NameTypeDescription
directiveMermaidConfigThe directive to push in

Returns ​

void

Defined in ​

config.ts:188


getConfig ​

β–Έ getConfig(): MermaidConfig

getConfig ​

FunctionDescriptionTypeReturn Values
getConfigObtains the currentConfigGet RequestAny Values from current Config

Notes: Returns any the currentConfig

Returns ​

MermaidConfig

The currentConfig

Defined in ​

config.ts:131


getSiteConfig ​

β–Έ getSiteConfig(): MermaidConfig

getSiteConfig ​

FunctionDescriptionTypeValues
setSiteConfigReturns the current siteConfig base configurationGet RequestReturns Any Values in siteConfig

Notes: Returns any values in siteConfig.

Returns ​

MermaidConfig

The siteConfig

Defined in ​

config.ts:96


reset ​

β–Έ reset(config?): void

reset ​

FunctionDescriptionTypeRequiredValues
resetResets currentConfig to confPut RequestRequiredNone

conf ​

ParameterDescriptionTypeRequiredValues
confbase set of values, which currentConfig could be reset to.DictionaryRequiredAny Values, with respect to the secure Array

Notes: (default: current siteConfig ) (optional, default getSiteConfig())

Parameters ​

NameTypeDefault valueDescription
configMermaidConfigsiteConfigbase set of values, which currentConfig could be reset to. Defaults to the current siteConfig (e.g returned by getSiteConfig).

Returns ​

void

Defined in ​

config.ts:218


sanitize ​

β–Έ sanitize(options): void

sanitize ​

FunctionDescriptionTypeValues
sanitizeSets the siteConfig to desired values.Put RequestNone

Ensures options parameter does not attempt to override siteConfig secure keys Notes: modifies options in-place

Parameters ​

NameTypeDescription
optionsanyThe potential setConfig parameter

Returns ​

void

Defined in ​

config.ts:146


saveConfigFromInitialize ​

β–Έ saveConfigFromInitialize(conf): void

Parameters ​

NameType
confMermaidConfig

Returns ​

void

Defined in ​

config.ts:75


setConfig ​

β–Έ setConfig(conf): MermaidConfig

setConfig ​

FunctionDescriptionTypeValues
setSiteConfigSets the siteConfig to desired valuesPut RequestAny Values, except ones in secure array

Notes: Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure keys. Any values found in conf with key found in siteConfig.secure will be replaced with the corresponding siteConfig value.

Parameters ​

NameTypeDescription
confMermaidConfigThe potential currentConfig

Returns ​

MermaidConfig

The currentConfig merged with the sanitized conf

Defined in ​

config.ts:113


setSiteConfig ​

β–Έ setSiteConfig(conf): MermaidConfig

setSiteConfig ​

FunctionDescriptionTypeValues
setSiteConfigSets the siteConfig to desired valuesPut RequestAny Values, except ones in secure array

Notes: Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig to the defaultConfig Note: currentConfig is set in this function Default value: At default, will mirror Global Config

Parameters ​

NameTypeDescription
confMermaidConfigThe base currentConfig to use as siteConfig

Returns ​

MermaidConfig

The new siteConfig

Defined in ​

config.ts:61


updateCurrentConfig ​

β–Έ updateCurrentConfig(siteCfg, _directives): MermaidConfig

Parameters ​

NameType
siteCfgMermaidConfig
_directivesMermaidConfig[]

Returns ​

MermaidConfig

Defined in ​

config.ts:15


updateSiteConfig ​

β–Έ updateSiteConfig(conf): MermaidConfig

Parameters ​

NameType
confMermaidConfig

Returns ​

MermaidConfig

Defined in ​

config.ts:79