node-html-parser
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -72,2 +72,5 @@ import he from 'he'; | ||
values() { | ||
return this._set.values(); | ||
} | ||
get value() { | ||
return Array.from(this._set.values()); | ||
@@ -325,3 +328,3 @@ } | ||
const idStr = node.id ? (`#${node.id}`) : ''; | ||
const classStr = node.classList.length ? (`.${node.classList.values().join('.')}`) : ''; // eslint-disable-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-call | ||
const classStr = node.classList.length ? (`.${node.classList.value.join('.')}`) : ''; // eslint-disable-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-call | ||
write(`${node.rawTagName}${idStr}${classStr}`); | ||
@@ -328,0 +331,0 @@ indention++; |
@@ -327,4 +327,11 @@ var __extends = (this && this.__extends) || (function () { | ||
DOMTokenList.prototype.values = function () { | ||
return Array.from(this._set.values()); | ||
return this._set.values(); | ||
}; | ||
Object.defineProperty(DOMTokenList.prototype, "value", { | ||
get: function () { | ||
return Array.from(this._set.values()); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
DOMTokenList.prototype.toString = function () { | ||
@@ -620,3 +627,3 @@ return Array.from(this._set.values()).join(' '); | ||
var idStr = node.id ? ("#" + node.id) : ''; | ||
var classStr = node.classList.length ? ("." + node.classList.values().join('.')) : ''; // eslint-disable-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-call | ||
var classStr = node.classList.length ? ("." + node.classList.value.join('.')) : ''; // eslint-disable-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-call | ||
write("" + node.rawTagName + idStr + classStr); | ||
@@ -623,0 +630,0 @@ indention++; |
@@ -25,3 +25,4 @@ import Node from './node'; | ||
get length(): number; | ||
values(): string[]; | ||
values(): IterableIterator<string>; | ||
get value(): string[]; | ||
toString(): string; | ||
@@ -28,0 +29,0 @@ } |
@@ -104,4 +104,11 @@ "use strict"; | ||
DOMTokenList.prototype.values = function () { | ||
return Array.from(this._set.values()); | ||
return this._set.values(); | ||
}; | ||
Object.defineProperty(DOMTokenList.prototype, "value", { | ||
get: function () { | ||
return Array.from(this._set.values()); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
DOMTokenList.prototype.toString = function () { | ||
@@ -397,3 +404,3 @@ return Array.from(this._set.values()).join(' '); | ||
var idStr = node.id ? ("#" + node.id) : ''; | ||
var classStr = node.classList.length ? ("." + node.classList.values().join('.')) : ''; // eslint-disable-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-call | ||
var classStr = node.classList.length ? ("." + node.classList.value.join('.')) : ''; // eslint-disable-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-call | ||
write("" + node.rawTagName + idStr + classStr); | ||
@@ -400,0 +407,0 @@ indention++; |
{ | ||
"name": "node-html-parser", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"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
165345
4440