Function minify_js::emit

source ·
pub fn emit<T: Write>(
    node_map: &NodeMap,
    top_level_node_id: NodeId,
    output: &mut T
) -> Result<(), MinifyError>
Expand description

Emits UTF-8 JavaScript code from a parsed AST in a minified way. This allows custom introspections and transforms on the tree before emitting it to code.

Arguments

  • node_map - The NodeMap from the parsed AST.
  • top_level_node_id - The ID of the root node from the parsed AST.
  • output - Destination to write output JavaScript code.