posthtml-remove-duplicates
0.0.4 • Public • Published Posthtml-remove-duplicates
Installation
$ npm i --save posthtml-remove-duplicates
Usage
<html>
<body>
<style>.a {color: black;}</style>
<style>.a {color: black;}</style>
</body>
</html>
var fs = require('fs');
var posthtml = require('posthtml');
posthtml()
.use(require('posthtml-remove-duplicates')('style'))
.process(fs.readFileSync('index.html', 'utf8'))
.then(function(result) {
return result;
});
Api
selector: string
: Selector to match html elements, passed to posthtml-match-helper.
License
MIT © Aleksandr Yakunichev
Dependencies (1)
Dev Dependencies (4)
Package Sidebar
Install
npm i posthtml-remove-duplicates
Weekly Downloads