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.
Parameters
Section titled “Parameters”string
format
Section titled “format”options?
Section titled “options?”ConversionOptions | PreparedOptions = {}
Returns
Section titled “Returns”Throws
Section titled “Throws”If input is not a string.
Throws
Section titled “Throws”If format is not supported or an option is invalid.