{"_id":"@azu/hast-util-to-html","_rev":"2-abeb53984c5c85a8e2d28b0fa1dd6d44","name":"@azu/hast-util-to-html","description":"Transform HAST to HTML","dist-tags":{"latest":"3.1.0"},"versions":{"3.1.0":{"name":"@azu/hast-util-to-html","version":"3.1.0","description":"Transform HAST to HTML","license":"MIT","keywords":["hast","util","html"],"files":["lib","index.js"],"repository":{"type":"git","url":"git+https://github.com/wooorm/hast-util-to-html.git"},"bugs":{"url":"https://github.com/wooorm/hast-util-to-html/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"dependencies":{"ccount":"^1.0.0","comma-separated-tokens":"^1.0.1","has":"^1.0.1","hast-util-is-element":"^1.0.0","hast-util-whitespace":"^1.0.0","html-void-elements":"^1.0.0","kebab-case":"^1.0.0","mdast-util-to-hast":"^2.2.0","property-information":"^3.1.0","remark":"^6.2.0","space-separated-tokens":"^1.0.0","stringify-entities":"^1.0.1","unist-util-is":"^2.0.0","xtend":"^4.0.1"},"devDependencies":{"browserify":"^13.0.1","bundle-collapser":"^1.2.1","esmangle":"^1.0.1","hastscript":"^3.0.0","nyc":"^10.0.0","remark-cli":"^2.1.0","remark-preset-wooorm":"^1.0.0","tape":"^4.0.0","unist-builder":"^1.0.1","xo":"^0.17.0"},"scripts":{"build-md":"remark . --quiet --frail --output","build-bundle":"browserify index.js --bare -s hastUtilToHTML > hast-util-to-html.js","build-mangle":"bundle-collapser hast-util-to-html.js | esmangle > hast-util-to-html.min.js","build":"npm run build-bundle && npm run build-mangle","lint":"xo","test-api":"node test","test-coverage":"nyc --reporter lcov tape test","test":"npm run build && npm run test-coverage"},"xo":{"space":true,"rules":{"guard-for-in":"off","eqeqeq":"off","no-eq-null":"off"},"ignores":["hast-util-to-html.js"]},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"remarkConfig":{"presets":"wooorm"},"gitHead":"2f5a4014749416a68255c8e1a0f0bf5733109eb8","homepage":"https://github.com/wooorm/hast-util-to-html#readme","_id":"@azu/hast-util-to-html@3.1.0","_shasum":"6f62b631b4c89e4ced962652b776a260917002c4","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"6f62b631b4c89e4ced962652b776a260917002c4","tarball":"https://registry.npmjs.org/@azu/hast-util-to-html/-/hast-util-to-html-3.1.0.tgz","integrity":"sha512-4OvGz3+yAF7hL1dAcxnWyhf9SUCP4YGVvwIM8LxxjhPXVH88OtyK6ZhsGobQFHCuOmA/whINf8IrR7B4Ylg0bQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFNobxFJiw6weZssT2yUvoH3kaUrnnjmnfS4lCWaOhwqAiAx5Kajhp4JclpqgX6diqrUHYN+Y6YAi6o2Ag1bT0WtbQ=="}]},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/hast-util-to-html-3.1.0.tgz_1486387331337_0.323359505739063"}}},"readme":"# hast-util-to-html [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]\n\nTransform [HAST][] to HTML.\n\n## Installation\n\n[npm][]:\n\n```bash\nnpm install hast-util-to-html\n```\n\n## Usage\n\n```javascript\nvar h = require('hastscript');\nvar toHTML = require('hast-util-to-html');\n\nvar tree = h('.alpha', [\n  'bravo ',\n  h('b', 'charlie'),\n  ' delta ',\n  h('a.echo', {\n    download: true\n  }, 'foxtrot')\n]);\n\nconsole.log(toHTML(tree));\n```\n\nYields:\n\n```html\n<div class=\"alpha\">bravo <b>charlie</b> delta <a class=\"echo\" download>foxtrot</a></div>\n```\n\n## API\n\n### `toHTML(node[, options])`\n\nStringify the given [HAST node][hast].\n\n###### `options.entities`\n\nConfiguration for [`stringify-entities`][stringify-entities]\n(`Object`, default: `{}`).  Do not use `escapeOnly`, `attribute`, or\n`subset` (`toHTML` already passes those).  However, `useNamedReferences`,\n`useShortestReferences`, and `omitOptionalSemicolons` are all fine.\n\n###### `options.voids`\n\nTag-names of elements to stringify without closing tag (`Array.<string>`,\ndefault: [`html-void-elements`][html-void-elements]).\n\n###### `options.quote`\n\nPreferred quote to use (`'\"'` or `'\\''`, default: `'\"'`).\n\n###### `options.quoteSmart`\n\nUse the other quote if that results in less bytes (`boolean`, default:\n`false`).\n\n###### `options.preferUnquoted`\n\nLeave attributes unquoted if that results in less bytes (`boolean`,\ndefault: `false`).\n\n###### `options.omitOptionalTags`\n\nOmit optional opening and closing tags (`boolean`, default: `false`).\nFor example, in `<ol><li>one</li><li>two</li></ol>`, both `</li>`\nclosing tags can be omitted.  The first because it’s followed by\nanother `li`, the last because it’s followed by nothing.\n\n###### `options.collapseEmptyAttributes`\n\nCollapse empty attributes: `class=\"\"` is stringified as `class` instead\n(`boolean`, default: `false`).  **Note**: boolean attributes, such as\n`hidden`, are always collapsed.\n\n###### `options.closeSelfClosing`\n\nClose self-closing nodes with an extra slash (`/`): `<img />` instead of\n`<img>` (`boolean`, default: `false`).\n\n###### `options.tightSelfClosing`\n\nDo not use an extra space when closing self-closing elements: `<img/>`\ninstead of `<img />` (`boolean`, default: `false`).  **Note**: Only used\nif `closeSelfClosing: true`.\n\n###### `options.tightCommaSeparatedLists`\n\nJoin known comma-separated attribute values with just a comma (`,`),\ninstead of padding them on the right as well (`,`) (`boolean`,\ndefault: `false`).\n\n###### `options.tightAttributes`\n\nJoin attributes together, without white-space, if possible:\n`class=\"a b\" title=\"c d\"` is stringified as `class=\"a b\"title=\"c d\"`\ninstead to save bytes (`boolean`, default: `false`).  **Note**: creates\ninvalid (but working) markup.\n\n###### `options.allowParseErrors`\n\nDo not encode characters which trigger parse errors (even though they\nwork), to save bytes (`boolean`, default: `false`).  **Note**: creates\ninvalid (but working) markup.\n\n###### `options.allowDangerousCharacters`\n\nDo not encode some characters which cause XSS vulnerabilities in older\nbrowsers (`boolean`, default: `false`).  **Note**: Only set this if you\ncompletely trust the content.\n\n###### `options.allowDangerousHTML`\n\nAllow `raw` nodes and insert them as raw HTML.  When falsey, encodes\n`raw` nodes (`boolean`, default: `false`).  **Note**: Only set this if\nyou completely trust the content.\n\n## Related\n\n*   [`hast-util-sanitize`][hast-util-sanitize]\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[travis-badge]: https://img.shields.io/travis/wooorm/hast-util-to-html.svg\n\n[travis]: https://travis-ci.org/wooorm/hast-util-to-html\n\n[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/hast-util-to-html.svg\n\n[codecov]: https://codecov.io/github/wooorm/hast-util-to-html\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[license]: LICENSE\n\n[author]: http://wooorm.com\n\n[hast]: https://github.com/wooorm/hast\n\n[html-void-elements]: https://github.com/wooorm/html-void-elements\n\n[stringify-entities]: https://github.com/wooorm/stringify-entities\n\n[hast-util-sanitize]: https://github.com/wooorm/hast-util-sanitize\n","maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"time":{"modified":"2022-06-12T15:00:15.114Z","created":"2017-02-06T13:22:11.566Z","3.1.0":"2017-02-06T13:22:11.566Z"},"homepage":"https://github.com/wooorm/hast-util-to-html#readme","keywords":["hast","util","html"],"repository":{"type":"git","url":"git+https://github.com/wooorm/hast-util-to-html.git"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"bugs":{"url":"https://github.com/wooorm/hast-util-to-html/issues"},"license":"MIT","readmeFilename":"readme.md"}