Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        


A minimal blazing fast HTML parser with zero dependencies.




Build Status


NPM Version


API Stability

## 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
```