node-html-parser
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -1,5 +0,7 @@ | ||
export { default as HTMLElement } from './nodes/html'; | ||
import HTMLElement from './nodes/html'; | ||
import TextNode from './nodes/text'; | ||
export { default as CommentNode } from './nodes/comment'; | ||
export { default as HTMLElement } from './nodes/html'; | ||
export { default as Node } from './nodes/node'; | ||
export { default as TextNode } from './nodes/text'; | ||
export interface Options { | ||
@@ -6,0 +8,0 @@ lowerCaseTagName?: boolean; |
@@ -8,8 +8,12 @@ "use strict"; | ||
var comment_1 = __importDefault(require("./nodes/comment")); | ||
var html_1 = require("./nodes/html"); | ||
exports.HTMLElement = html_1.default; | ||
var html_2 = __importDefault(require("./nodes/html")); | ||
var html_1 = __importDefault(require("./nodes/html")); | ||
var text_1 = __importDefault(require("./nodes/text")); | ||
var comment_2 = require("./nodes/comment"); | ||
exports.CommentNode = comment_2.default; | ||
var html_2 = require("./nodes/html"); | ||
exports.HTMLElement = html_2.default; | ||
var node_1 = require("./nodes/node"); | ||
exports.Node = node_1.default; | ||
var text_2 = require("./nodes/text"); | ||
exports.TextNode = text_2.default; | ||
// https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name | ||
@@ -66,3 +70,3 @@ var kMarkupPattern = /<!--[^]*?(?=-->)-->|<(\/?)([a-z][-.:0-9_a-z]*)\s*([^>]*?)(\/?)>/ig; | ||
if (options === void 0) { options = {}; } | ||
var root = new html_2.default(null, {}); | ||
var root = new html_1.default(null, {}); | ||
var currentParent = root; | ||
@@ -105,3 +109,3 @@ var stack = [root]; | ||
} | ||
currentParent = currentParent.appendChild(new html_2.default(match[2], attrs, match[3])); | ||
currentParent = currentParent.appendChild(new html_1.default(match[2], attrs, match[3])); | ||
stack.push(currentParent); | ||
@@ -192,3 +196,3 @@ if (kBlockTextElements[match[2]]) { | ||
response.childNodes.forEach(function (node) { | ||
if (node instanceof html_2.default) { | ||
if (node instanceof html_1.default) { | ||
node.parentNode = null; | ||
@@ -195,0 +199,0 @@ } |
@@ -10,3 +10,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "./back", "./nodes/comment", "./nodes/html", "./nodes/html", "./nodes/text", "./nodes/node"], factory); | ||
define(["require", "exports", "./back", "./nodes/comment", "./nodes/html", "./nodes/text", "./nodes/comment", "./nodes/html", "./nodes/node", "./nodes/text"], factory); | ||
} | ||
@@ -18,8 +18,12 @@ })(function (require, exports) { | ||
var comment_1 = __importDefault(require("./nodes/comment")); | ||
var html_1 = require("./nodes/html"); | ||
exports.HTMLElement = html_1.default; | ||
var html_2 = __importDefault(require("./nodes/html")); | ||
var html_1 = __importDefault(require("./nodes/html")); | ||
var text_1 = __importDefault(require("./nodes/text")); | ||
var comment_2 = require("./nodes/comment"); | ||
exports.CommentNode = comment_2.default; | ||
var html_2 = require("./nodes/html"); | ||
exports.HTMLElement = html_2.default; | ||
var node_1 = require("./nodes/node"); | ||
exports.Node = node_1.default; | ||
var text_2 = require("./nodes/text"); | ||
exports.TextNode = text_2.default; | ||
// https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name | ||
@@ -76,3 +80,3 @@ var kMarkupPattern = /<!--[^]*?(?=-->)-->|<(\/?)([a-z][-.:0-9_a-z]*)\s*([^>]*?)(\/?)>/ig; | ||
if (options === void 0) { options = {}; } | ||
var root = new html_2.default(null, {}); | ||
var root = new html_1.default(null, {}); | ||
var currentParent = root; | ||
@@ -115,3 +119,3 @@ var stack = [root]; | ||
} | ||
currentParent = currentParent.appendChild(new html_2.default(match[2], attrs, match[3])); | ||
currentParent = currentParent.appendChild(new html_1.default(match[2], attrs, match[3])); | ||
stack.push(currentParent); | ||
@@ -202,3 +206,3 @@ if (kBlockTextElements[match[2]]) { | ||
response.childNodes.forEach(function (node) { | ||
if (node instanceof html_2.default) { | ||
if (node instanceof html_1.default) { | ||
node.parentNode = null; | ||
@@ -205,0 +209,0 @@ } |
{ | ||
"name": "node-html-parser", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "A very fast HTML parser, generating a simplified DOM, with basic element query support.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
156129
2797
0