Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-html-parser

Package Overview
Dependencies
Maintainers
1
Versions
120
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.7 to 1.2.8

24

dist/index.js

@@ -76,3 +76,3 @@ "use strict";

var match;
while (match = kMarkupPattern.exec(data)) {
var _loop_1 = function () {
if (lastTextPos > -1) {

@@ -93,3 +93,3 @@ if (lastTextPos + match[0].length < kMarkupPattern.lastIndex) {

}
continue;
return "continue";
}

@@ -115,4 +115,11 @@ if (options.lowerCaseTagName)

// a little test to find next </script> or </style> ...
var closeMarkup = '</' + match[2] + '>';
var index = data.indexOf(closeMarkup, kMarkupPattern.lastIndex);
var closeMarkup_1 = '</' + match[2] + '>';
var index = (function () {
if (options.lowerCaseTagName) {
return data.toLocaleLowerCase().indexOf(closeMarkup_1, kMarkupPattern.lastIndex);
}
else {
return data.indexOf(closeMarkup_1, kMarkupPattern.lastIndex);
}
})();
if (options[match[2]]) {

@@ -135,3 +142,3 @@ var text = void 0;

else {
lastTextPos = kMarkupPattern.lastIndex = index + closeMarkup.length;
lastTextPos = kMarkupPattern.lastIndex = index + closeMarkup_1.length;
match[1] = 'true';

@@ -165,2 +172,5 @@ }

}
};
while (match = kMarkupPattern.exec(data)) {
_loop_1();
}

@@ -171,3 +181,3 @@ var valid = !!(stack.length === 1);

response.valid = valid;
var _loop_1 = function () {
var _loop_2 = function () {
// Handle each error elements.

@@ -198,3 +208,3 @@ var last = stack.pop();

while (stack.length > 1) {
_loop_1();
_loop_2();
}

@@ -201,0 +211,0 @@ response.childNodes.forEach(function (node) {

@@ -85,3 +85,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

var match;
while (match = kMarkupPattern.exec(data)) {
var _loop_1 = function () {
if (lastTextPos > -1) {

@@ -102,3 +102,3 @@ if (lastTextPos + match[0].length < kMarkupPattern.lastIndex) {

}
continue;
return "continue";
}

@@ -124,4 +124,11 @@ if (options.lowerCaseTagName)

// a little test to find next </script> or </style> ...
var closeMarkup = '</' + match[2] + '>';
var index = data.indexOf(closeMarkup, kMarkupPattern.lastIndex);
var closeMarkup_1 = '</' + match[2] + '>';
var index = (function () {
if (options.lowerCaseTagName) {
return data.toLocaleLowerCase().indexOf(closeMarkup_1, kMarkupPattern.lastIndex);
}
else {
return data.indexOf(closeMarkup_1, kMarkupPattern.lastIndex);
}
})();
if (options[match[2]]) {

@@ -144,3 +151,3 @@ var text = void 0;

else {
lastTextPos = kMarkupPattern.lastIndex = index + closeMarkup.length;
lastTextPos = kMarkupPattern.lastIndex = index + closeMarkup_1.length;
match[1] = 'true';

@@ -174,2 +181,5 @@ }

}
};
while (match = kMarkupPattern.exec(data)) {
_loop_1();
}

@@ -180,3 +190,3 @@ var valid = !!(stack.length === 1);

response.valid = valid;
var _loop_1 = function () {
var _loop_2 = function () {
// Handle each error elements.

@@ -207,3 +217,3 @@ var last = stack.pop();

while (stack.length > 1) {
_loop_1();
_loop_2();
}

@@ -210,0 +220,0 @@ response.childNodes.forEach(function (node) {

{
"name": "node-html-parser",
"version": "1.2.7",
"version": "1.2.8",
"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