Helps to perform transformations with boolean attributes
npm install posthtml-boolean-attributes[![NPM][npm]][npm-url]
[![Deps][deps]][deps-url]
[![Build][build]][build-badge]
[![Coverage][cover]][cover-badge]
[![Standard Code Style][style]][style-url]
Doesn't set ="" if set to true, If an array is specified, it will not set the value ['customeBooleanAttr'] for the specified attributes and when specifying ['!customeBooleanAttr'] in the array will exclude attributes.
Before:
`` html`
After:
` html`
> npm i posthtml posthtml-boolean-attributes
` js
const fs = require('fs');
const posthtml = require('posthtml');
const booleanAttributes = require('posthtml-boolean-attributes');
posthtml()
.use(booleanAttributes({ / options / }))
.process(html/, options /)
.then(result => fs.writeFileSync('./after.html', result.html));
`
#### boolAttrs
Type: Boolean|Array true
Default: =""
Description: Doesn't set if set to true, if an array is specified, it will not set the value ['customeBooleanAttr']` for the specified attributes and when specifying ['!customeBooleanAttr'] in the array will exclude attributes.
See PostHTML Guidelines and contribution guide.
[npm]: https://img.shields.io/npm/v/posthtml-boolean-attributes.svg
[npm-url]: https://npmjs.com/package/posthtml-boolean-attributes
[deps]: https://david-dm.org/posthtml/posthtml-boolean-attributes.svg
[deps-url]: https://david-dm.org/posthtml/posthtml-boolean-attributes
[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg
[style-url]: http://standardjs.com/
[build]: https://travis-ci.org/posthtml/posthtml-boolean-attributes.svg?branch=master
[build-badge]: https://travis-ci.org/posthtml/posthtml-boolean-attributes?branch=master
[cover]: https://coveralls.io/repos/posthtml/posthtml-boolean-attributes/badge.svg?branch=master
[cover-badge]: https://coveralls.io/r/posthtml/posthtml-boolean-attributes?branch=master