Socket
Socket
Sign inDemoInstall

node-html-parser

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-html-parser - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

4

dist/index.d.ts

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc