Skip to main content

Function: getTomlKeyValue()

getTomlKeyValue(tomlSource: string, key: string): string | null

Defined in: _internal/config-file-scanner.ts:204

Finds the value of a TOML scalar assignment (key = value).

Matches non-blank, non-comment lines where the key appears at any indentation level (TOML values may be inside table sections).

Returns null when the key is absent or when the value is empty / whitespace-only. Strips surrounding single/double quotes from the returned value.

Parameters​

tomlSource​

string

key​

string

Returns​

string | null