@zoho-slyte/html-parser

1.0.0 • Public • Published

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 validation

  • deepFreezer.js - a javascript library which deepFreezes the object's contents

  • decodeHtmlEntities.js - a javascript library which decode HTML entities and converts them to equivalent symbols

  • getUnclosedTags.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] );

(or)

htmlParser.htmlToJsObjectLyteRendered.toHtml( object );

Options

  • enhanced - enhanced flag adds previous, parent and next node of html object on creation

  • checkUnclosedTag - checks for unclosed tags before compilation

  • withoutTemplateConversion - converts html template to js object without converting lyte specific template

  • withLineIndex - This flag adds the line number of the corresponding node object

  • withColumnIndex - 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

Readme

Keywords

Package Sidebar

Install

npm i @zoho-slyte/html-parser

Weekly Downloads

4

Version

1.0.0

License

ISC

Unpacked Size

1.01 MB

Total Files

24

Last publish

Collaborators

  • lyte-team