posthtml-extend-attrs

1.0.0 • Public • Published

posthtml-extend-attrs

PostHTMLExtendAttrs is plugin for PostHTML. It extend HTML attrs with new attrs and data.

Usage

var posthtml = require('posthtml'),
    html = '<div class="wow">OMG</div>';
 
posthtml([ require('posthtml-extend-attrs')({
    attrsTree: { '.wow' : { id: 'wow_id' }}
})])
    .process(html)
    .then(function(result) {
        console.log(result);
    });
 
// <div class="wow" id="wow_id">OMG</div>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    7
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    7

Package Sidebar

Install

npm i posthtml-extend-attrs

Weekly Downloads

7

Version

1.0.0

License

MIT

Last publish

Collaborators

  • voischev