UNPKG

xobuilder-extractor

Version:

> **A sophisticated web application that converts HTML and CSS to JSON layout through an intelligent multi-step flow process with AI validation.**

24 lines (23 loc) 793 B
/** * Function optimize the structure of the HTML parsed object * Merge html block with the same structure to reduce the size of the object * @param obj - The HTML parsed object * @returns The optimized HTML parsed object * * @example * div.grid_class { * div.column_class { * h1.heading_class { text: "Heading text" }, p.p_class { text: "Paragraph text" } * } * div.column_class { * h1.heading_class { text: "Heading text" }, p.p_class { text: "Paragraph text" } * } * } * * // It will be optimized to: * div.grid_class { * div.column_class*2 { * h1.heading_class { text: "Heading text" }, p.p_class { text: "Paragraph text" } * } */ export declare function optimizeStructureHtmlParsed(obj: Record<string, any>): Record<string, any>;