node-html-parser 4.1.3 → 5.1.0

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 ADDED
@@ -0,0 +1,42 @@
1
+ # Changelog
2
+
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
+
5
+ ## [5.1.0](https://github.com/taoqf/node-fast-html-parser/compare/v4.1.5...v5.1.0) (2021-10-28)
6
+
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * Add esm named export support (closes #160 closes #139)
11
+
12
+ ### Features
13
+
14
+ * Add esm named export support (closes [#160](https://github.com/taoqf/node-fast-html-parser/issues/160) closes [#139](https://github.com/taoqf/node-fast-html-parser/issues/139)) ([0d4b922](https://github.com/taoqf/node-fast-html-parser/commit/0d4b922eefd6210fe802991e464b21b0c69d5f63))
15
+ * Added HTMLElement#getElementsByTagName ([d462e44](https://github.com/taoqf/node-fast-html-parser/commit/d462e449e7ebb00a5a43fb574133681ad5a62475))
16
+ * Expose `HTMLElement#rawAttrs` (make public) ([34f1595](https://github.com/taoqf/node-fast-html-parser/commit/34f1595756c0974b6ae7ef5755a615f09e421f32))
17
+ * Improved parsing performance + matching (closes [#164](https://github.com/taoqf/node-fast-html-parser/issues/164)) ([3c5b8e2](https://github.com/taoqf/node-fast-html-parser/commit/3c5b8e2a9104b01a8ca899a7970507463e42adaf))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * Add null to return type for HTMLElement#querySelector (closes [#157](https://github.com/taoqf/node-fast-html-parser/issues/157)) ([2b65583](https://github.com/taoqf/node-fast-html-parser/commit/2b655839bd3868c41fb19cae5786ca097565bc7f))
23
+ * blockTextElements incorrectly matching partial tag (detail) (fixes [#156](https://github.com/taoqf/node-fast-html-parser/issues/156) fixes [#124](https://github.com/taoqf/node-fast-html-parser/issues/124)) ([6823349](https://github.com/taoqf/node-fast-html-parser/commit/6823349fdf1809c7484c70d948aa24930ef4983f))
24
+
25
+ ## [5.0.0](https://github.com/taoqf/node-fast-html-parser/compare/v4.1.5...v5.0.0) (2021-10-10)
26
+
27
+
28
+ ### ⚠ BREAKING CHANGES
29
+
30
+ * Added esm named export support ([0d4b922](https://github.com/taoqf/node-fast-html-parser/commit/0d4b922eefd6210fe802991e464b21b0c69d5f63))
31
+
32
+ ### Features
33
+
34
+ * Added esm named export support (closes [#160](https://github.com/taoqf/node-fast-html-parser/issues/160) closes [#139](https://github.com/taoqf/node-fast-html-parser/issues/139)) ([0d4b922](https://github.com/taoqf/node-fast-html-parser/commit/0d4b922eefd6210fe802991e464b21b0c69d5f63))
35
+ * Added HTMLElement#getElementsByTagName ([d462e44](https://github.com/taoqf/node-fast-html-parser/commit/d462e449e7ebb00a5a43fb574133681ad5a62475))
36
+ * Improved parsing performance + matching (closes [#164](https://github.com/taoqf/node-fast-html-parser/issues/164)) ([3c5b8e2](https://github.com/taoqf/node-fast-html-parser/commit/3c5b8e2a9104b01a8ca899a7970507463e42adaf))
37
+
38
+
39
+ ### Bug Fixes
40
+
41
+ * Add null to return type for HTMLElement#querySelector (closes [#157](https://github.com/taoqf/node-fast-html-parser/issues/157)) ([2b65583](https://github.com/taoqf/node-fast-html-parser/commit/2b655839bd3868c41fb19cae5786ca097565bc7f))
42
+ * blockTextElements incorrectly matching partial tag (detail) (fixes [#156](https://github.com/taoqf/node-fast-html-parser/issues/156) fixes [#124](https://github.com/taoqf/node-fast-html-parser/issues/124)) ([6823349](https://github.com/taoqf/node-fast-html-parser/commit/6823349fdf1809c7484c70d948aa24930ef4983f))
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Fast HTML Parser [![NPM version](https://badge.fury.io/js/node-html-parser.png)](http://badge.fury.io/js/node-html-parser) [![Build Status](https://travis-ci.org/taoqf/node-html-parser.svg?branch=master)](https://travis-ci.org/taoqf/node-html-parser)
1
+ # Fast HTML Parser [![NPM version](https://badge.fury.io/js/node-html-parser.png)](http://badge.fury.io/js/node-html-parser) [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Ftaoqf%2Fnode-html-parser%2Fbadge%3Fref%3Dmain&style=flat)](https://actions-badge.atrox.dev/taoqf/node-html-parser/goto?ref=main)
2
2
 
3
3
  Fast HTML Parser is a _very fast_ HTML parser. Which will generate a simplified
4
4
  DOM tree, with element query support.
@@ -78,7 +78,7 @@ Parse given data, and return root of the generated DOM.
78
78
  ```js
79
79
  {
80
80
  lowerCaseTagName: false, // convert tag name to lower case (hurt performance heavily)
81
- comment: false // retrieve comments (hurt performance slightly)
81
+ comment: false, // retrieve comments (hurt performance slightly)
82
82
  blockTextElements: {
83
83
  script: true, // keep text content when parsing
84
84
  noscript: true, // keep text content when parsing
@@ -112,6 +112,12 @@ Note: Full css3 selector supported since v3.0.0.
112
112
 
113
113
  Query CSS Selector to find matching node.
114
114
 
115
+ ### HTMLElement#getElementsByTagName(tagName)
116
+
117
+ Get all elements with the specified tagName.
118
+
119
+ Note: * for all elements.
120
+
115
121
  ### HTMLElement#closest(selector)
116
122
 
117
123
  Query closest element by css selector.
@@ -199,7 +205,7 @@ Get unescaped text value of current node and its children. Like `innerText`.
199
205
 
200
206
  ### HTMLElement#rawText
201
207
 
202
- Get escpaed (as-it) text value of current node and its children. May have
208
+ Get escaped (as-it) text value of current node and its children. May have
203
209
  `&` in it. (fast)
204
210
 
205
211
  ### HTMLElement#tagName
@@ -252,4 +258,4 @@ Get all attributes of current element. **Notice: do not try to change the return
252
258
 
253
259
  ### HTMLElement#range
254
260
 
255
- Corresponding source code start and end indexes (ie [ 0, 40 ])
261
+ Corresponding source code start and end indexes (ie [ 0, 40 ])