Skip to main content

Function: hasTopLevelYamlKey()

hasTopLevelYamlKey(yamlSource: string, key: string): boolean

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

Returns true when a root-level YAML mapping key is present in the source.

The key must appear at indentation level 0 on a non-blank, non-comment line. A key with an empty value (key:) is still considered present.

Parameters​

yamlSource​

string

key​

string

Returns​

boolean