html-arborist

3.0.2 • Public • Published

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

/html-arborist/

    Package Sidebar

    Install

    npm i html-arborist

    Weekly Downloads

    2

    Version

    3.0.2

    License

    MIT

    Unpacked Size

    44 kB

    Total Files

    83

    Last publish

    Collaborators

    • leahcimic