html-ps
v1.0.10
Published
Parses and serializes (HTML ⇄ DOM)
Downloads
77
Readme
HTML PS (HTML ⇄ DOM)
This module takes HTML string as input and produces simplified DOM which then, after being changed can be serialized back.
Installation
You can install it with npm:
npm i html-psExample
const fs = require('fs')
const parse = require('html-ps')
const html = fs.readFileSync('index.html').toString()
const dom = parse(html)
dom.title = 'New Title'
console.log(dom.toString())