3.0.2 • Published 1 year ago

html-arborist v3.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
1 year ago

HTML Arborist

Build Status

Parse HTML into a object model, and perform tree surgery.

A library that parses HTML into an object model. Allowing you to perform complex transforms on the tree of nodes, and stitch it back together producing modified HTML.

It's a little rough around the edges, not optimised, and not flexible. These things will change over time. This is the start.

Table of Contents

Usage

const htmlArborist = require('html-arborist');

htmlArborist('<html><body><h1 onclick="alert(\'hello\')">Hello</h1></body></html>'); // <h2>Hello</h2>

API

A much more refined API allowing you to specify what transforms, and options for those transforms is coming.

Contribute

See the contribute file!

PRs accepted.

License

MIT © Michael Leaney