Skip to main content

getConfig

FitFileViewer - API Documentation v30.0.1


FitFileViewer - API Documentation / utils/config/constants / getConfig

Function: getConfig()

getConfig(path: string, defaultValue?: unknown): unknown

Defined in: utils/config/constants.ts:282

Get a configuration value by dot-notation path.

Parameters​

path​

string

Dot-notation path to a configuration value.

defaultValue?​

unknown

Value returned when the path does not exist.

Returns​

unknown

Configuration value, or the provided default value.

Example​

GetConfig("UI_CONSTANTS.DEFAULT_THEME"); // "dark"
getConfig("CONVERSION_FACTORS.METERS_PER_MILE"); // 1609.344