Skip to content

IniLineDecoder

Defined in: packages/format-ini/src/ini-line-codec.ts:27

Decodes one IniNode per line.

INI is line-oriented and every line — section header, property, comment, blank — is self-delimiting, so unlike JSON, YAML or TOML the grammar really does stream. That is what makes this wire face possible at all; the three formats it used to be grouped with have no equivalent.

Offsets in the emitted spans are relative to the line, not to the whole document: the decoder never sees what came before. Use parseIniDocument where document-absolute spans are needed.

new IniLineDecoder(options?): IniLineDecoder

Defined in: packages/format-ini/src/ini-line-codec.ts:28

IniParseOptions

IniLineDecoder

decode(view, context): DecodeResult<IniNode>

Defined in: packages/format-ini/src/ini-line-codec.ts:30

Attempt to decode one value from the front of view.

view is a window into the driver’s buffer and is invalidated as soon as this call returns. Copy anything retained in the returned value.

string

DecodeContext

DecodeResult<IniNode>

Decoder.decode