npm i parse7 -S
# or yarn add parse7
import parse7 from 'parse7'
// OR const parse7 = require('parse7')
parse7(html, handlers)
- Type:
string
- Required:
true
-
Type:
{ [hook: string]: function }
-
Required:
true
Currently there are 4 hooks:
- tagStart(name: string, attrs: Array<{ name: string, value: string}>)
- tagEnd(name: string)
- comments(comment: string)
- chars(char: string)
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
parse7 © ulivz, Released under the MIT License.
Authored and maintained by ulivz with help from contributors (list).
github.com/ulivz · GitHub @ulivz