Need private packages and team management tools?Check out npm Teams »

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'

Keywords

none

Install

npm i html-classer

DownloadsWeekly Downloads

0

Version

0.0.3

License

none

Last publish

Collaborators

  • avatar