{"id":24983706,"url":"https://github.com/posthtml/posthtml-boolean-attributes","last_synced_at":"2025-03-29T10:12:44.246Z","repository":{"id":42703381,"uuid":"299300915","full_name":"posthtml/posthtml-boolean-attributes","owner":"posthtml","description":"Helps to perform transformations with boolean attributes","archived":false,"fork":false,"pushed_at":"2022-11-09T23:44:31.000Z","size":228,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T21:06:04.067Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/posthtml.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-28T12:25:36.000Z","updated_at":"2021-08-13T07:13:33.000Z","dependencies_parsed_at":"2023-01-21T09:02:01.849Z","dependency_job_id":null,"html_url":"https://github.com/posthtml/posthtml-boolean-attributes","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":"posthtml/posthtml-plugin-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-boolean-attributes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-boolean-attributes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-boolean-attributes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-boolean-attributes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posthtml","download_url":"https://codeload.github.com/posthtml/posthtml-boolean-attributes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245710570,"owners_count":20659920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-04T09:20:33.610Z","updated_at":"2025-03-29T10:12:44.223Z","avatar_url":"https://github.com/posthtml.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostHTML Plugin Boolean Attributes \u003cimg align=\"right\" width=\"220\" height=\"200\" title=\"PostHTML logo\" src=\"http://posthtml.github.io/posthtml/logo.svg\"\u003e\n\n[![NPM][npm]][npm-url]\n[![Deps][deps]][deps-url]\n[![Build][build]][build-badge]\n[![Coverage][cover]][cover-badge]\n[![Standard Code Style][style]][style-url]\n\nDoesn'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.\n\nBefore:\n``` html\n  \u003cscript async\u003e\u003c/script\u003e\n```\n\nAfter:\n``` html\n  \u003cscript async=\"\"\u003e\u003c/script\u003e\n```\n\n## Install\n\n\u003e npm i posthtml posthtml-boolean-attributes\n\n## Usage\n\n``` js\nconst fs = require('fs');\nconst posthtml = require('posthtml');\nconst booleanAttributes = require('posthtml-boolean-attributes');\n\nposthtml()\n    .use(booleanAttributes({ /* options */ }))\n    .process(html/*, options */)\n    .then(result =\u003e fs.writeFileSync('./after.html', result.html));\n```\n\n## Options\n\n#### `boolAttrs`\n\nType: `Boolean|Array\u003cString|RegExp\u003e`  \nDefault: `true`  \nDescription: *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.*\n\n### Contributing\n\nSee [PostHTML Guidelines](https://github.com/posthtml/posthtml/tree/master/docs) and [contribution guide](CONTRIBUTING.md).\n\n[npm]: https://img.shields.io/npm/v/posthtml-boolean-attributes.svg\n[npm-url]: https://npmjs.com/package/posthtml-boolean-attributes\n\n[deps]: https://david-dm.org/posthtml/posthtml-boolean-attributes.svg\n[deps-url]: https://david-dm.org/posthtml/posthtml-boolean-attributes\n\n[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg\n[style-url]: http://standardjs.com/\n\n[build]: https://travis-ci.org/posthtml/posthtml-boolean-attributes.svg?branch=master\n[build-badge]: https://travis-ci.org/posthtml/posthtml-boolean-attributes?branch=master\n\n[cover]: https://coveralls.io/repos/posthtml/posthtml-boolean-attributes/badge.svg?branch=master\n[cover-badge]: https://coveralls.io/r/posthtml/posthtml-boolean-attributes?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-boolean-attributes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthtml%2Fposthtml-boolean-attributes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-boolean-attributes/lists"}