Socket
Socket
Sign inDemoInstall

node-html-parser

Package Overview
Dependencies
10
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.2 to 4.1.3

49

dist/main.js

@@ -30,6 +30,10 @@ var __extends = (this && this.__extends) || (function () {

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || from);
};

@@ -123,3 +127,3 @@ define("back", ["require", "exports"], function (require, exports) {

get: function () {
return he_1.decode(this.rawText);
return (0, he_1.decode)(this.rawText);
},

@@ -685,3 +689,3 @@ enumerable: false,

});
this.parentNode.childNodes = __spreadArray(__spreadArray(__spreadArray([], this.parentNode.childNodes.slice(0, idx)), content), this.parentNode.childNodes.slice(idx + 1));
this.parentNode.childNodes = __spreadArray(__spreadArray(__spreadArray([], this.parentNode.childNodes.slice(0, idx), true), content, true), this.parentNode.childNodes.slice(idx + 1), true);
};

@@ -779,3 +783,3 @@ Object.defineProperty(HTMLElement.prototype, "outerHTML", {

HTMLElement.prototype.querySelectorAll = function (selector) {
return css_select_1.selectAll(selector, this, {
return (0, css_select_1.selectAll)(selector, this, {
xmlMode: true,

@@ -848,3 +852,3 @@ adapter: matcher_1.default

HTMLElement.prototype.querySelector = function (selector) {
return css_select_1.selectOne(selector, this, {
return (0, css_select_1.selectOne)(selector, this, {
xmlMode: true,

@@ -922,3 +926,3 @@ adapter: matcher_1.default

while (el) {
var e = css_select_1.selectOne(selector, el, {
var e = (0, css_select_1.selectOne)(selector, el, {
xmlMode: true,

@@ -928,8 +932,5 @@ adapter: __assign(__assign({}, matcher_1.default), { getChildren: function (node) {

return child && [child];
},
getSiblings: function (node) {
}, getSiblings: function (node) {
return [node];
},
findOne: findOne,
findAll: function () {
}, findOne: findOne, findAll: function () {
return [];

@@ -973,3 +974,3 @@ } })

get: function () {
return back_1.default(this.childNodes);
return (0, back_1.default)(this.childNodes);
},

@@ -1136,3 +1137,3 @@ enumerable: false,

});
(_a = this.parentNode.childNodes).splice.apply(_a, __spreadArray([idx + 1, 0], p.childNodes));
(_a = this.parentNode.childNodes).splice.apply(_a, __spreadArray([idx + 1, 0], p.childNodes, false));
p.childNodes.forEach(function (n) {

@@ -1156,3 +1157,3 @@ if (n instanceof HTMLElement) {

});
(_c = this.parentNode.childNodes).splice.apply(_c, __spreadArray([idx, 0], p.childNodes));
(_c = this.parentNode.childNodes).splice.apply(_c, __spreadArray([idx, 0], p.childNodes, false));
p.childNodes.forEach(function (n) {

@@ -1383,3 +1384,3 @@ if (n instanceof HTMLElement) {

stack.pop();
currentParent = back_1.default(stack);
currentParent = (0, back_1.default)(stack);
}

@@ -1423,3 +1424,3 @@ }

stack.pop();
currentParent = back_1.default(stack);
currentParent = (0, back_1.default)(stack);
break;

@@ -1433,3 +1434,3 @@ }

stack.pop();
currentParent = back_1.default(stack);
currentParent = (0, back_1.default)(stack);
continue;

@@ -1458,3 +1459,3 @@ }

var last = stack.pop();
var oneBefore = back_1.default(stack);
var oneBefore = (0, back_1.default)(stack);
if (last.parentNode && last.parentNode.parentNode) {

@@ -1520,6 +1521,6 @@ if (last.parentNode === oneBefore && last.tagName === oneBefore.tagName) {

get: function () {
return he_3.decode(this.rawText);
return (0, he_3.decode)(this.rawText);
},
set: function (val) {
this.rawText = he_3.encode(val);
this.rawText = (0, he_3.encode)(val);
},

@@ -1583,3 +1584,3 @@ enumerable: false,

if (options === void 0) { options = { lowerCaseTagName: false, comment: false }; }
var stack = html_2.base_parse(data, options);
var stack = (0, html_2.base_parse)(data, options);
return Boolean(stack.length === 1);

@@ -1586,0 +1587,0 @@ }

@@ -17,3 +17,3 @@ import Node from './node';

get text(): string;
toString(): `<!--${string}-->`;
toString(): string;
}

@@ -28,6 +28,10 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || from);
};

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

});
this.parentNode.childNodes = __spreadArray(__spreadArray(__spreadArray([], this.parentNode.childNodes.slice(0, idx)), content), this.parentNode.childNodes.slice(idx + 1));
this.parentNode.childNodes = __spreadArray(__spreadArray(__spreadArray([], this.parentNode.childNodes.slice(0, idx), true), content, true), this.parentNode.childNodes.slice(idx + 1), true);
};

@@ -532,3 +536,3 @@ Object.defineProperty(HTMLElement.prototype, "outerHTML", {

HTMLElement.prototype.querySelectorAll = function (selector) {
return css_select_1.selectAll(selector, this, {
return (0, css_select_1.selectAll)(selector, this, {
xmlMode: true,

@@ -601,3 +605,3 @@ adapter: matcher_1.default

HTMLElement.prototype.querySelector = function (selector) {
return css_select_1.selectOne(selector, this, {
return (0, css_select_1.selectOne)(selector, this, {
xmlMode: true,

@@ -675,3 +679,3 @@ adapter: matcher_1.default

while (el) {
var e = css_select_1.selectOne(selector, el, {
var e = (0, css_select_1.selectOne)(selector, el, {
xmlMode: true,

@@ -681,8 +685,5 @@ adapter: __assign(__assign({}, matcher_1.default), { getChildren: function (node) {

return child && [child];
},
getSiblings: function (node) {
}, getSiblings: function (node) {
return [node];
},
findOne: findOne,
findAll: function () {
}, findOne: findOne, findAll: function () {
return [];

@@ -726,3 +727,3 @@ } })

get: function () {
return back_1.default(this.childNodes);
return (0, back_1.default)(this.childNodes);
},

@@ -889,3 +890,3 @@ enumerable: false,

});
(_a = this.parentNode.childNodes).splice.apply(_a, __spreadArray([idx + 1, 0], p.childNodes));
(_a = this.parentNode.childNodes).splice.apply(_a, __spreadArray([idx + 1, 0], p.childNodes, false));
p.childNodes.forEach(function (n) {

@@ -909,3 +910,3 @@ if (n instanceof HTMLElement) {

});
(_c = this.parentNode.childNodes).splice.apply(_c, __spreadArray([idx, 0], p.childNodes));
(_c = this.parentNode.childNodes).splice.apply(_c, __spreadArray([idx, 0], p.childNodes, false));
p.childNodes.forEach(function (n) {

@@ -1136,3 +1137,3 @@ if (n instanceof HTMLElement) {

stack.pop();
currentParent = back_1.default(stack);
currentParent = (0, back_1.default)(stack);
}

@@ -1176,3 +1177,3 @@ }

stack.pop();
currentParent = back_1.default(stack);
currentParent = (0, back_1.default)(stack);
break;

@@ -1186,3 +1187,3 @@ }

stack.pop();
currentParent = back_1.default(stack);
currentParent = (0, back_1.default)(stack);
continue;

@@ -1211,3 +1212,3 @@ }

var last = stack.pop();
var oneBefore = back_1.default(stack);
var oneBefore = (0, back_1.default)(stack);
if (last.parentNode && last.parentNode.parentNode) {

@@ -1214,0 +1215,0 @@ if (last.parentNode === oneBefore && last.tagName === oneBefore.tagName) {

@@ -28,6 +28,6 @@ "use strict";

get: function () {
return he_1.decode(this.rawText);
return (0, he_1.decode)(this.rawText);
},
set: function (val) {
this.rawText = he_1.encode(val);
this.rawText = (0, he_1.encode)(val);
},

@@ -34,0 +34,0 @@ enumerable: false,

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

get: function () {
return he_1.decode(this.rawText);
return (0, he_1.decode)(this.rawText);
},

@@ -90,0 +90,0 @@ enumerable: false,

@@ -10,5 +10,5 @@ "use strict";

if (options === void 0) { options = { lowerCaseTagName: false, comment: false }; }
var stack = html_1.base_parse(data, options);
var stack = (0, html_1.base_parse)(data, options);
return Boolean(stack.length === 1);
}
exports.default = valid;
{
"name": "node-html-parser",
"version": "4.1.2",
"version": "4.1.3",
"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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc