{"_id":"rehype-sort-attributes","_rev":"386398","name":"rehype-sort-attributes","description":"rehype plugin to reorder attributes based on how often they occur","dist-tags":{"latest":"4.0.0"},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"time":{"modified":"2021-08-04T03:25:20.000Z","created":"2016-09-08T13:13:38.906Z","4.0.0":"2021-08-01T19:07:29.156Z","3.0.2":"2020-07-02T11:14:31.303Z","3.0.1":"2020-03-21T18:30:01.006Z","3.0.0":"2019-09-10T10:20:53.994Z","2.0.1":"2019-06-01T13:42:57.146Z","2.0.0":"2018-11-17T18:18:19.906Z","1.0.1":"2017-06-20T11:28:57.870Z","1.0.0":"2016-09-08T13:13:38.906Z"},"users":{},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"repository":{"type":"git","url":"git+https://github.com/rehypejs/rehype-minify.git#main"},"versions":{"4.0.0":{"name":"rehype-sort-attributes","version":"4.0.0","description":"rehype plugin to reorder attributes based on how often they occur","license":"MIT","keywords":["unified","rehype","rehype-plugin","plugin","html","minify","mangle","attribute","sort"],"repository":{"type":"git","url":"git+https://github.com/rehypejs/rehype-minify.git#main"},"bugs":{"url":"https://github.com/rehypejs/rehype-minify/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/hast":"^2.0.0","unified":"^10.0.0","unist-util-visit":"^4.0.0"},"scripts":{"build":"rimraf \"*.d.ts\" && tsc && type-coverage","test":"node --conditions development test.js"},"xo":false,"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"homepage":"https://github.com/rehypejs/rehype-minify/tree/main#readme","_id":"rehype-sort-attributes@4.0.0","_nodeVersion":"16.2.0","_npmVersion":"7.18.1","dist":{"shasum":"b7766c864a370a07dd8ffa93b02c98322c20fe67","size":2728,"noattachment":false,"key":"/rehype-sort-attributes/-/rehype-sort-attributes-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rehype-sort-attributes/download/rehype-sort-attributes-4.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehype-sort-attributes_4.0.0_1627844848996_0.4040014519899422"},"_hasShrinkwrap":false,"publish_time":1627844849156,"_cnpm_publish_time":1627844849156},"3.0.2":{"name":"rehype-sort-attributes","version":"3.0.2","description":"rehype plugin to reorder attributes based on how often they occur","license":"MIT","keywords":["unified","rehype","rehype-plugin","plugin","html","minify","mangle","attribute","sort"],"repository":{"type":"git","url":"https://github.com/rehypejs/rehype-minify/tree/main/packages/rehype-sort-attributes"},"bugs":{"url":"https://github.com/rehypejs/rehype-minify/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com"}],"dependencies":{"unist-util-visit":"^2.0.0"},"xo":false,"_id":"rehype-sort-attributes@3.0.2","_nodeVersion":"14.0.0","_npmVersion":"6.14.5","dist":{"shasum":"18c7e86b34de4b0222d0d54412e860333bd74b7e","size":1981,"noattachment":false,"key":"/rehype-sort-attributes/-/rehype-sort-attributes-3.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rehype-sort-attributes/download/rehype-sort-attributes-3.0.2.tgz"},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehype-sort-attributes_3.0.2_1593688471160_0.21552907073795868"},"_hasShrinkwrap":false,"publish_time":1593688471303,"_cnpm_publish_time":1593688471303},"3.0.1":{"name":"rehype-sort-attributes","version":"3.0.1","description":"rehype plugin to reorder attributes based on how often they occur","license":"MIT","keywords":["unified","rehype","rehype-plugin","plugin","html","minify","mangle","attribute","sort"],"repository":{"type":"git","url":"https://github.com/rehypejs/rehype-minify/tree/master/packages/rehype-sort-attributes"},"bugs":{"url":"https://github.com/rehypejs/rehype-minify/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com"}],"dependencies":{"unist-util-visit":"^2.0.0"},"xo":false,"_id":"rehype-sort-attributes@3.0.1","_nodeVersion":"13.10.1","_npmVersion":"6.14.3","dist":{"shasum":"e20d35304a47e7118703ed31d97fbbbaf53968c2","size":1982,"noattachment":false,"key":"/rehype-sort-attributes/-/rehype-sort-attributes-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rehype-sort-attributes/download/rehype-sort-attributes-3.0.1.tgz"},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehype-sort-attributes_3.0.1_1584815400880_0.6647189284797925"},"_hasShrinkwrap":false,"publish_time":1584815401006,"_cnpm_publish_time":1584815401006},"3.0.0":{"name":"rehype-sort-attributes","version":"3.0.0","description":"rehype plugin to reorder attributes based on how often they occur","license":"MIT","keywords":["unified","rehype","hast","attribute","sort"],"repository":{"type":"git","url":"https://github.com/rehypejs/rehype-minify/tree/master/packages/rehype-sort-attributes"},"bugs":{"url":"https://github.com/rehypejs/rehype-minify/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com"}],"dependencies":{"unist-util-visit":"^2.0.0"},"xo":false,"_id":"rehype-sort-attributes@3.0.0","_nodeVersion":"12.2.0","_npmVersion":"6.11.2","dist":{"shasum":"904c405ecc6cca969ee9016037991d21493e4e60","size":1953,"noattachment":false,"key":"/rehype-sort-attributes/-/rehype-sort-attributes-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rehype-sort-attributes/download/rehype-sort-attributes-3.0.0.tgz"},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehype-sort-attributes_3.0.0_1568110853812_0.40791136937748296"},"_hasShrinkwrap":false,"publish_time":1568110853994,"_cnpm_publish_time":1568110853994},"2.0.1":{"name":"rehype-sort-attributes","version":"2.0.1","description":"rehype plugin to reorder attributes based on how often they occur","license":"MIT","keywords":["unified","rehype","hast","attribute","sort"],"repository":{"type":"git","url":"https://github.com/rehypejs/rehype-minify/tree/master/packages/rehype-sort-attributes"},"bugs":{"url":"https://github.com/rehypejs/rehype-minify/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com"}],"dependencies":{"unist-util-visit":"^1.0.0"},"xo":false,"_id":"rehype-sort-attributes@2.0.1","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"shasum":"acf5189e0b2611b55ef9cbf475f74c361ed09ae8","size":1952,"noattachment":false,"key":"/rehype-sort-attributes/-/rehype-sort-attributes-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rehype-sort-attributes/download/rehype-sort-attributes-2.0.1.tgz"},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehype-sort-attributes_2.0.1_1559396576988_0.24625443951163795"},"_hasShrinkwrap":false,"publish_time":1559396577146,"_cnpm_publish_time":1559396577146},"2.0.0":{"name":"rehype-sort-attributes","version":"2.0.0","description":"Reorder attributes based on how often they occur","license":"MIT","keywords":["rehype","hast","attribute","sort"],"repository":{"type":"git","url":"https://github.com/rehypejs/rehype-minify/tree/master/packages/rehype-sort-attributes"},"bugs":{"url":"https://github.com/rehypejs/rehype-minify/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com"}],"dependencies":{"unist-util-visit":"^1.0.0"},"xo":false,"_id":"rehype-sort-attributes@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"11.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"dc4060cca02df734ed1e19cdb94fd4496bbc4a74","size":1362,"noattachment":false,"key":"/rehype-sort-attributes/-/rehype-sort-attributes-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rehype-sort-attributes/download/rehype-sort-attributes-2.0.0.tgz"},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehype-sort-attributes_2.0.0_1542478699738_0.7245524904098473"},"_hasShrinkwrap":false,"publish_time":1542478699906,"_cnpm_publish_time":1542478699906},"1.0.1":{"name":"rehype-sort-attributes","version":"1.0.1","description":"Reorder attributes based on how often they occur","license":"MIT","keywords":["rehype","hast","attribute","sort"],"repository":{"type":"git","url":"https://github.com/wooorm/rehype-minify/tree/master/packages/rehype-sort-attributes"},"bugs":{"url":"https://github.com/wooorm/rehype-minify/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com"}],"files":["index.js"],"dependencies":{"unist-util-visit":"^1.0.0","hast-util-has-property":"^1.0.0"},"xo":false,"_id":"rehype-sort-attributes@1.0.1","_npmVersion":"5.0.3","_nodeVersion":"8.1.2","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"b70a631025f1d43cd85c0ec99f37e0452a0e24cf","size":1183,"noattachment":false,"key":"/rehype-sort-attributes/-/rehype-sort-attributes-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rehype-sort-attributes/download/rehype-sort-attributes-1.0.1.tgz"},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehype-sort-attributes-1.0.1.tgz_1497958136893_0.13293269323185086"},"directories":{},"publish_time":1497958137870,"_cnpm_publish_time":1497958137870,"_hasShrinkwrap":false},"1.0.0":{"name":"rehype-sort-attributes","version":"1.0.0","description":"Reorder attributes based on how often they occur","license":"MIT","keywords":["rehype","hast","attribute","sort"],"repository":{"type":"git","url":"https://github.com/wooorm/rehype-minify/tree/master/packages/rehype-sort-attributes"},"bugs":{"url":"https://github.com/wooorm/rehype-minify/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com"}],"files":["index.js"],"dependencies":{"has":"^1.0.1","unist-util-visit":"^1.0.0","hast-util-has-property":"^1.0.0"},"_id":"rehype-sort-attributes@1.0.0","scripts":{},"_shasum":"b3ae8f578553c75ff4b29302d51a29ad202610e7","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.3.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"b3ae8f578553c75ff4b29302d51a29ad202610e7","size":1166,"noattachment":false,"key":"/rehype-sort-attributes/-/rehype-sort-attributes-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rehype-sort-attributes/download/rehype-sort-attributes-1.0.0.tgz"},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/rehype-sort-attributes-1.0.0.tgz_1473340417425_0.07400984596461058"},"directories":{},"publish_time":1473340418906,"_cnpm_publish_time":1473340418906,"_hasShrinkwrap":false}},"readme":"<!--This file is generated by `build-packages.js`-->\n\n# rehype-sort-attributes\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\nReorder attributes based on how often they occur.\n\nThis optimizes for repetition-based compression (such as GZip).\n\n## Install\n\nThis package is [ESM only][esm]:\nNode 12+ is needed to use it and it must be `imported`ed instead of `required`d.\n\n[npm][]:\n\n```sh\nnpm install rehype-sort-attributes\n```\n\nThis package exports no identifiers.\nThe default export is `rehypeSortAttributes`\n\n## Use\n\nOn the API:\n\n```diff\n import {unified} from 'unified'\n import rehypeParse from 'rehype-parse'\n+import rehypeSortAttributes from 'rehype-sort-attributes'\n import rehypeStringify from 'rehype-stringify'\n\n unified()\n   .use(rehypeParse)\n+  .use(rehypeSortAttributes)\n   .use(rehypeStringify)\n   .process('<span>some html</span>', function (err, file) {\n     console.error(report(err || file))\n     console.log(String(file))\n   })\n```\n\nOn the CLI:\n\n```sh\nrehype input.html --use sort-attributes --output output.html\n```\n\n## Example\n\n##### In\n\n```html\n<div id=\"foo\"><strong class=\"bar\" id=\"baz\">qux</strong></div>\n```\n\n##### Out\n\n```html\n<div id=\"foo\"><strong class=\"bar\" id=\"baz\">qux</strong></div>\n```\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`rehypejs/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n[build-badge]: https://github.com/rehypejs/rehype-minify/workflows/main/badge.svg\n\n[build]: https://github.com/rehypejs/rehype-minify/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/rehypejs/rehype-minify.svg\n\n[coverage]: https://codecov.io/github/rehypejs/rehype-minify\n\n[downloads-badge]: https://img.shields.io/npm/dm/rehype-sort-attributes.svg\n\n[downloads]: https://www.npmjs.com/package/rehype-sort-attributes\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/rehype-sort-attributes.svg\n\n[size]: https://bundlephobia.com/result?p=rehype-sort-attributes\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/rehypejs/rehype/discussions\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[health]: https://github.com/rehypejs/.github\n\n[contributing]: https://github.com/rehypejs/.github/blob/main/contributing.md\n\n[support]: https://github.com/rehypejs/.github/blob/main/support.md\n\n[coc]: https://github.com/rehypejs/.github/blob/main/code-of-conduct.md\n\n[license]: https://github.com/rehypejs/rehype-minify/blob/main/license\n\n[author]: https://wooorm.com\n","_attachments":{},"homepage":"https://github.com/rehypejs/rehype-minify/tree/main#readme","bugs":{"url":"https://github.com/rehypejs/rehype-minify/issues"},"license":"MIT"}