domelementtype
Advanced tools
Comparing version 2.1.0 to 2.2.0
/** Types of elements found in htmlparser2's DOM */ | ||
export declare const enum ElementType { | ||
export declare enum ElementType { | ||
/** Type for the root element of a document */ | ||
@@ -4,0 +4,0 @@ Root = "root", |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = void 0; | ||
exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0; | ||
/** Types of elements found in htmlparser2's DOM */ | ||
var ElementType; | ||
(function (ElementType) { | ||
/** Type for the root element of a document */ | ||
ElementType["Root"] = "root"; | ||
/** Type for Text */ | ||
ElementType["Text"] = "text"; | ||
/** Type for <? ... ?> */ | ||
ElementType["Directive"] = "directive"; | ||
/** Type for <!-- ... --> */ | ||
ElementType["Comment"] = "comment"; | ||
/** Type for <script> tags */ | ||
ElementType["Script"] = "script"; | ||
/** Type for <style> tags */ | ||
ElementType["Style"] = "style"; | ||
/** Type for Any tag */ | ||
ElementType["Tag"] = "tag"; | ||
/** Type for <![CDATA[ ... ]]> */ | ||
ElementType["CDATA"] = "cdata"; | ||
/** Type for <!doctype ...> */ | ||
ElementType["Doctype"] = "doctype"; | ||
})(ElementType = exports.ElementType || (exports.ElementType = {})); | ||
/** | ||
@@ -10,5 +32,5 @@ * Tests whether an element is a tag or not. | ||
function isTag(elem) { | ||
return (elem.type === "tag" /* Tag */ || | ||
elem.type === "script" /* Script */ || | ||
elem.type === "style" /* Style */); | ||
return (elem.type === ElementType.Tag || | ||
elem.type === ElementType.Script || | ||
elem.type === ElementType.Style); | ||
} | ||
@@ -18,18 +40,18 @@ exports.isTag = isTag; | ||
/** Type for the root element of a document */ | ||
exports.Root = "root" /* Root */; | ||
exports.Root = ElementType.Root; | ||
/** Type for Text */ | ||
exports.Text = "text" /* Text */; | ||
exports.Text = ElementType.Text; | ||
/** Type for <? ... ?> */ | ||
exports.Directive = "directive" /* Directive */; | ||
exports.Directive = ElementType.Directive; | ||
/** Type for <!-- ... --> */ | ||
exports.Comment = "comment" /* Comment */; | ||
exports.Comment = ElementType.Comment; | ||
/** Type for <script> tags */ | ||
exports.Script = "script" /* Script */; | ||
exports.Script = ElementType.Script; | ||
/** Type for <style> tags */ | ||
exports.Style = "style" /* Style */; | ||
exports.Style = ElementType.Style; | ||
/** Type for Any tag */ | ||
exports.Tag = "tag" /* Tag */; | ||
exports.Tag = ElementType.Tag; | ||
/** Type for <![CDATA[ ... ]]> */ | ||
exports.CDATA = "cdata" /* CDATA */; | ||
exports.CDATA = ElementType.CDATA; | ||
/** Type for <!doctype ...> */ | ||
exports.Doctype = "doctype" /* Doctype */; | ||
exports.Doctype = ElementType.Doctype; |
{ | ||
"name": "domelementtype", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "all the types of nodes in htmlparser2's dom", | ||
@@ -5,0 +5,0 @@ "author": "Felix Boehm <me@feedic.com>", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6858
102