unpack-html

2.0.2 • Public • Published

unpack-html

Unpack html source into elements

Example

Uses unpack-element and fragment.Element to construct a DOM element from the source string and then unpack that DOM element into an object containing elements

var html = require("unpack-html")
    , source = "<div>hello <span id='thing'>world</span></div>"
 
var elements = html(source)
 
elements.root; // that div
elements.thing; // that span

Installation

npm install unpack-html

Contributors

  • Raynos

MIT Licenced

Readme

Keywords

none

Package Sidebar

Install

npm i unpack-html

Weekly Downloads

12

Version

2.0.2

License

none

Last publish

Collaborators

  • raynos