html-classer

0.0.3 • Public • Published

html-classer

Build Status

Add html classes to every dom node in a fragment.

npm i html-classer

Using

require('html-classer')(fs.readFileSync("wow.html", 'utf8'), {
  klass: "tom-jones"
})

Turns

<p>
<b> ok </b>
</p>

Into

<p class='tom-jones'>
<b class='tom-jones'> ok </b>
</p>

API

  • Options

    • html classer takes a single key value pair of klass: 'class-name'

Readme

Keywords

none

Package Sidebar

Install

npm i html-classer

Weekly Downloads

0

Version

0.0.3

License

none

Last publish

Collaborators

  • samccone