@zoho-slyte/html-parser
v1.0.0
Published
Parser to replace headless chromium[V3CRM]
Readme
Html Parser
This package consists of certain javascript files which can be reused in multiple applications.
Table of Contents
List of Javascript Files
checkType.js- a javascript type checking library which can be extended by creating custom types and using it for validationdeepFreezer.js- a javascript library which deepFreezes the object's contentsdecodeHtmlEntities.js- a javascript library which decode HTML entities and converts them to equivalent symbolsgetUnclosedTags.js- a javascript library capable of detecting the presence of unclosed or unopened HTML tags in a given code snippet. The expected output consist of an error object, which includes the line number where the issue occurred.HandleMustache.js- a javascript library that can effectively identify syntax errors within Mustache templates and also detects the type of a Mustache template [Mixed, Normal Data, Multi-dimensional array, helper].htmlToJsObjectLyteRendered.js- a javascript library used to convert HTML to JS objects and vice versa
Usage
htmlParser.htmlToJsObjectLyteRendered.toObject( htmlString, [Options] );htmlParser.htmlToJsObjectLyteRendered.toHtml( object );Options
enhanced- enhanced flag adds previous, parent and next node of html object on creationcheckUnclosedTag- checks for unclosed tags before compilationwithoutTemplateConversion- converts html template to js object without converting lyte specific templatewithLineIndex- This flag adds the line number of the corresponding node objectwithColumnIndex- This flag adds the vertical index of the corresponding node object
Output file
Compiled Output file will be present under dist
Complete Consolidated file will be present under the name htmlParser.js
Custom Bundle
For Custom consolidations, individually bundled files are present in dist/js folder
For this custom bundling process, it is required to include
dist/js/initializer.(js|min.js)at first and then include all other necessary files
ESM version
For Custom Bundling process, ESM version of the util files are available under the /dist/esm folder
