extract-dom
v1.1.0
Published
## Extract a specific element's every property including innerHTML.
Downloads
9
Readme
Extract Dom
Extract a specific element's every property including innerHTML.
const extractDom = require('extract-dom');
const data =
'<html><head></head><body><h2 class="title">Hello there!</h2></body></html>';
const dom = extractDom(data, 'h2.class=title');
// console.log(dom)
/*
[
{
innerHTML: 'Hello there!',
class: 'title'
}
]
*/