Node to serialize.
Optional
options: SerializerOptions<T>Serialization options.
const parse5 = require('parse5');
const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>');
// Serializes a document.
const html = parse5.serialize(document);
// Serializes the <html> element content.
const str = parse5.serialize(document.childNodes[1]);
console.log(str); //> '<head></head><body>Hi there!</body>'
Serializes an AST node to an HTML string.