var Extrator = require("html-extractor");
var myExtrator = new Extrator();
var html = `
<html>
<head>
<title>Testpage</title>
</head>
<body>
<h1>Header 1</h1>
<p>Content</p>
</body>
</html>
`
myExtrator.extract( html, function( err, data ){
if( err ){
throw( err )
} else {
console.log( data );
// {
// meta: {
// title: 'Testpage',
// description: '',
// keywords: []
// },
// body: ' Header 1 Content ',
// h1: [ 'Header 1' ]
// }
}
});