1.0.2 • Published 1 year ago

html-ps v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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-ps

Example

const fs = require('fs')
const parser = require('html-parser')

const html = fs.readFileSync('index.html').toString()
const dom = parser(html)

dom.title = 'New Title'

console.log(dom.toString())