Skip to content
greek conversion

parse

parse(input, format, options?): Document

Defined in: src/conversion.ts:100 (opens in a new tab)

Parses one supported representation into the canonical document model.

Unknown input is retained as literal tokens. Presets and custom options are resolved before parsing because some transliteration spellings are option-dependent: the transliteration group, greek.accentuation, and the disposition of the smooth breathing (diacritics.smoothBreathing, or diacritics.all) decide how transliteration is read, while reading Greek or Beta Code depends on no option. As in a conversion, the input is read with options.source when it is given. Every option is validated whatever the format.

string

Format

ConversionOptions | PreparedOptions = {}

Document

If input is not a string.

If format is not supported or an option is invalid.