encode
encode(
document,format,options?):string
Defined in: src/conversion.ts:181 (opens in a new tab)
Encodes a canonical document in one supported representation.
This function does not validate manually constructed documents. Call
validateDocument() first when the document did not originate from
parse.
Parameters
Section titled “Parameters”document
Section titled “document”format
Section titled “format”options?
Section titled “options?”ConversionOptions | PreparedOptions = {}
Returns
Section titled “Returns”string
Throws
Section titled “Throws”If format is not supported or an option is invalid.