parseIniDocument
parseIniDocument(
source,options?):IniDocument
Defined in: packages/format-ini/src/parse-ini-document.ts:101
Parses INI source into a lossless IniDocument.
The grammar accepted is the permissive union of what real INI files contain:
both ; and # comment markers, [section] headers, key = value and
valueless key, single- or double-quoted values, and blank lines. Nothing is
rejected — a line that matches no rule is kept as a property with the whole
line as its key — because an INI parser that throws is unusable against the
variety of files that call themselves INI.
Interpretation is deliberately left to the caller: duplicate keys, dotted key nesting and type coercion are decisions a consumer makes over this tree, not decisions the syntax can settle.
Parameters
Section titled “Parameters”source
Section titled “source”string