parse_html_to_node 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. package/README.md +11 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # parse_html
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/parse_html)](https://www.npmjs.com/package/parse_html)
3
+ [![npm version](https://img.shields.io/npm/v/parse_html_to_node)](https://www.npmjs.com/package/parse_html_to_node)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
  [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
6
6
 
@@ -19,25 +19,25 @@
19
19
  ## 安装
20
20
 
21
21
  ```bash
22
- npm install parse_html
22
+ npm install parse_html_to_node
23
23
  ```
24
24
 
25
25
 
26
26
 
27
27
  ```bash
28
- yarn add parse_html
28
+ yarn add parse_html_to_node
29
29
  ```
30
30
 
31
31
 
32
32
 
33
33
  ```bash
34
- pnpm add parse_html
34
+ pnpm add parse_html_to_node
35
35
  ```
36
36
 
37
37
  ## 快速开始
38
38
 
39
39
  ```javascript
40
- import Node from 'parse_html';
40
+ import Node from 'parse_html_to_node';
41
41
 
42
42
  // 解析单根HTML
43
43
  const html = `
@@ -183,7 +183,7 @@ const htmlString = node.getHtml();
183
183
  ### 1. 多根节点解析
184
184
 
185
185
  ```javascript
186
- import Node from 'parse_html';
186
+ import Node from 'parse_html_to_node';
187
187
 
188
188
  const multiRootHtml = `
189
189
  <p>第一段文本</p>
@@ -200,7 +200,7 @@ console.log(fragmentNode.getHtml()); // 输出拼接后的完整HTML
200
200
  ### 2. DOM操作
201
201
 
202
202
  ```javascript
203
- import Node from 'parse_html';
203
+ import Node from 'parse_html_to_node';
204
204
 
205
205
  const parent = new Node('<div id="parent"></div>');
206
206
 
@@ -219,7 +219,7 @@ console.log(parent.getHtml());
219
219
  ### 3. 属性和样式操作
220
220
 
221
221
  ```javascript
222
- import Node from 'parse_html';
222
+ import Node from 'parse_html_to_node';
223
223
 
224
224
  const node = new Node('<div>Test</div>');
225
225
 
@@ -247,7 +247,7 @@ console.log(node.getStyle('color')); // "green"
247
247
  ### 4. 文本节点处理
248
248
 
249
249
  ```javascript
250
- import Node from 'parse_html';
250
+ import Node from 'parse_html_to_node';
251
251
 
252
252
  const html = 'Hello <strong>World</strong>!';
253
253
  const node = new Node(html);
@@ -283,7 +283,7 @@ pnpm run build
283
283
  ### 项目结构
284
284
 
285
285
  ```
286
- parse_html/
286
+ parse_html_to_node/
287
287
  ├── lib/
288
288
  │ └── index.ts # 源代码
289
289
  ├── dist/ # 构建输出
@@ -309,5 +309,5 @@ parse_html/
309
309
  ## 相关链接
310
310
 
311
311
  - [GitHub仓库](https://github.com/Easy-Martin/parse_html)
312
- - [npm包](https://www.npmjs.com/package/parse_html)
312
+ - [npm包](https://www.npmjs.com/package/parse_html_to_node)
313
313
  - [问题反馈](https://github.com/Easy-Martin/parse_html/issues)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse_html_to_node",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "This is an HTML string parsed into an object, which does not depend on a browser environment and can be used in any JavaScript runtime.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",