Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maierfelix/htmlparse
Minimal blazing fast HTML parser
https://github.com/maierfelix/htmlparse
Last synced: about 1 month ago
JSON representation
Minimal blazing fast HTML parser
- Host: GitHub
- URL: https://github.com/maierfelix/htmlparse
- Owner: maierfelix
- License: mit
- Created: 2016-12-02T16:33:29.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-04T21:04:53.000Z (almost 8 years ago)
- Last Synced: 2024-08-02T05:13:17.128Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 7
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-blazingly-fast - htmlparse - Minimal blazing fast HTML parser (JavaScript)
README
A minimal blazing fast HTML parser with zero dependencies.
## Installation
```sh
npm install htmlparse
```Or clone the source:
```sh
git clone https://github.com/maierfelix/htmlparse.git
```## API
#### parse
Use `parse(str)` to parse an HTML string
```js
let ast = parser.parse(str); // returns ast
```#### serialize
Use `serialize(ast)` to serialize an AST back into it's relative string
```js
let ast = parser.serialize(ast); // returns string
```