Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

yizhi-html-parser

kangkang5208ISC1.0.8TypeScript support: included

解析HTML为dom树

html, parser, script, style

readme

HTML解析器

解析HTML为dom树

使用

//导入库
import { HTMLParser } from 'yizhi-html-parser'
//创建解析器
const parser = new HTMLParser('<div>xxxxxxx</div>')
//解析之后得到一个文档
const result = parser.parse()