node-html-parser 6.1.9 → 6.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [6.1.10](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.9...v6.1.10) (2023-09-15)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * [#242](https://github.com/taoqf/node-fast-html-parser/issues/242) ([36670f4](https://github.com/taoqf/node-fast-html-parser/commit/36670f4bb15f18b3cdfec0484f67c4cb891f1e79))
11
+ * [#251](https://github.com/taoqf/node-fast-html-parser/issues/251) ([42365de](https://github.com/taoqf/node-fast-html-parser/commit/42365dee6b28da5ab4017508b1ba15be503f001e))
12
+
5
13
  ### [6.1.9](https://github.com/taoqf/node-fast-html-parser/compare/v6.1.8...v6.1.9) (2023-09-11)
6
14
 
7
15
 
package/README.md CHANGED
@@ -115,7 +115,7 @@ class HTMLElement{
115
115
  Node appendChild(Node node)
116
116
  this insertAdjacentHTML('beforebegin' | 'afterbegin' | 'beforeend' | 'afterend' where, string html)
117
117
  this setAttribute(string key, string value)
118
- this setAttributes(Record~string, string~ attrs)
118
+ this setAttributes(Record string, string attrs)
119
119
  this removeAttribute(string key)
120
120
  string getAttribute(string key)
121
121
  this exchangeChild(Node oldNode, Node newNode)
@@ -143,7 +143,7 @@ class HTMLElement{
143
143
  string innerHTML
144
144
  string outerHTML
145
145
  string textContent
146
- Record~string, string~ attributes
146
+ Record<string, string> attributes
147
147
  [number, number] range
148
148
  }
149
149
  class Node{
package/dist/main.js CHANGED
@@ -1355,11 +1355,9 @@ define("nodes/html", ["require", "exports", "css-select", "he", "back", "matcher
1355
1355
  style: true,
1356
1356
  pre: true,
1357
1357
  };
1358
- var element_names = Object.keys(elements).filter(function (name) {
1359
- return Boolean(elements[name]);
1360
- });
1358
+ var element_names = Object.keys(elements);
1361
1359
  var kBlockTextElements = element_names.map(function (it) { return new RegExp("^".concat(it, "$"), 'i'); });
1362
- var kIgnoreElements = element_names.filter(function (it) { return elements[it]; }).map(function (it) { return new RegExp("^".concat(it, "$"), 'i'); });
1360
+ var kIgnoreElements = element_names.filter(function (it) { return Boolean(elements[it]); }).map(function (it) { return new RegExp("^".concat(it, "$"), 'i'); });
1363
1361
  function element_should_be_ignore(tag) {
1364
1362
  return kIgnoreElements.some(function (it) { return it.test(tag); });
1365
1363
  }
@@ -1021,11 +1021,9 @@ function base_parse(data, options) {
1021
1021
  style: true,
1022
1022
  pre: true,
1023
1023
  };
1024
- var element_names = Object.keys(elements).filter(function (name) {
1025
- return Boolean(elements[name]);
1026
- });
1024
+ var element_names = Object.keys(elements);
1027
1025
  var kBlockTextElements = element_names.map(function (it) { return new RegExp("^".concat(it, "$"), 'i'); });
1028
- var kIgnoreElements = element_names.filter(function (it) { return elements[it]; }).map(function (it) { return new RegExp("^".concat(it, "$"), 'i'); });
1026
+ var kIgnoreElements = element_names.filter(function (it) { return Boolean(elements[it]); }).map(function (it) { return new RegExp("^".concat(it, "$"), 'i'); });
1029
1027
  function element_should_be_ignore(tag) {
1030
1028
  return kIgnoreElements.some(function (it) { return it.test(tag); });
1031
1029
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-html-parser",
3
- "version": "6.1.9",
3
+ "version": "6.1.10",
4
4
  "description": "A very fast HTML parser, generating a simplified DOM, with basic element query support.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -60,6 +60,7 @@
60
60
  "@typescript-eslint/eslint-plugin-tslint": "latest",
61
61
  "@typescript-eslint/parser": "latest",
62
62
  "blanket": "latest",
63
+ "boolbase": "^1.0.0",
63
64
  "cheerio": "^1.0.0-rc.12",
64
65
  "cross-env": "^7.0.3",
65
66
  "eslint": "^8.23.1",