{"name":"hast-util-is-body-ok-link","version":"1.0.3","description":"hast utility to check if a link element is “Body OK”","license":"MIT","keywords":["unist","hast","hast-util","util","utility","html","link","body","ok"],"repository":{"type":"git","url":"https://github.com/rehypejs/rehype-minify/tree/master/packages/hast-util-is-body-ok-link"},"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":{"hast-util-has-property":"^1.0.0","hast-util-is-element":"^1.0.0"},"xo":false,"_id":"hast-util-is-body-ok-link@1.0.3","_nodeVersion":"13.10.1","_npmVersion":"6.14.3","dist":{"integrity":"sha512-NB8jW4iqT+iVld2oCjSk0T2S2FyR86rDZ7nKHx3WNf/WX16fjjdfoog6T+YeJFsPzszVKsNlVJL+k5c4asAHog==","shasum":"752b16a7ebd6d73d35dde55c02742c934a1aa47b","tarball":"http://registry-npm.ywwl.com/hast-util-is-body-ok-link/download/hast-util-is-body-ok-link-1.0.3.tgz","fileCount":3,"unpackedSize":4698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedlyNCRA9TVsSAnZWagAAUHcQAKRSXTjBiJGLj68py9A9\npbpNsb0LWn72bX2LF2Ez7skwrlz0q+XKJiYfEegpupOcjQvAoqFl+RLVENDH\nfgxMaokLP/2IQG0AsC5F4TXe9Le6EFvvqQet4glXpV72qP/0DZ/zsEwibMOv\nfdBSIA02uXoeBr/T2mJ1DHe6STzasFDC7mWSLefD7nyTMFZFiqo7r7j7SmjH\n7NoBjBo9CAhtcnbwecUbwPjLHmTEIe7SLLae1Dy91u57QBXGNSygucoVcxMX\npWflgxtL5V1yjz1Ni6TMnmq4PGq/XSe7j/+G7ZwVgpq9+PwYhj083H25Yyjo\npsLtTLeo35KNOWtFdDGJZbXMR2vY7UwpJNIZ4AWpM1SoKHtaYvrciwHVif2N\ni3d0pELdZe5aZCuCLnfeVfTx9I6M30dGPBNtqlIZecwUwH1F6EaK/o8W68m4\nMqVdzbHHFU8AvuOoJCNgqxLzd3dc1TCONfa6h2cY7UaSSlM8M/wNBHt/vNOq\n62uQ05zh9xvJakr5qgAWeqHei0LKnY7/HXVQsXzJXDaY3HtPTdjpHIexhXvA\n4zoQvkaEhM5DZYd8VtiPzOV4BfUZzMdE+2kexE0ZapsH4Olv1EtOnLSHfuTA\nqpgEuajKoyEZPuz4L3LiMVUxJ0XKGXS8PngKhbA7P1G2SFj/Li0UoufXZgNd\nXId4\r\n=PWVA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE1tElFF2in4sl8/CKWUWexjwzi9jTqfLZlG6M5yyFyVAiEAvjpensLLp8kzoRf1yiy/Pv3Z9xoiTfeVrIYic34SwnY="}],"size":1747,"noattachment":false,"key":"/hast-util-is-body-ok-link/-/hast-util-is-body-ok-link-1.0.3.tgz"},"maintainers":[{"email":"keith@mcknig.ht","name":"kmck"},{"email":"tituswormer@gmail.com","name":"wooorm"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hast-util-is-body-ok-link_1.0.3_1584815244869_0.1791898945869128"},"_hasShrinkwrap":false,"readme":"<!--This file is generated-->\n\n# hast-util-is-body-ok-link\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][funding-sponsors-badge]][funding]\n[![Backers][funding-backers-badge]][funding]\n[![Chat][chat-badge]][chat]\n\n[`hast`][hast] utility to check if a `link` element is “body OK”.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`isBodyOkLink(node)`](#isbodyoklinknode)\n*   [Syntax](#syntax)\n*   [Syntax tree](#syntax-tree)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package is a utility that, when given a hast node, checks whether it\nis a “body OK” link.\n\n## When should I use this?\n\nYou can use this package to check whether links can exist inside `<body>`\n(outside of `<head>`).\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install hast-util-is-body-ok-link\n```\n\nIn Deno with [`esm.sh`][esm-sh]:\n\n```js\nimport {isBodyOkLink} from 'https://esm.sh/hast-util-is-body-ok-link@3'\n```\n\nIn browsers with [`esm.sh`][esm-sh]:\n\n```html\n<script type=\"module\">\n  import {isBodyOkLink} from 'https://esm.sh/hast-util-is-body-ok-link@3?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {h} from 'hastscript'\nimport {isBodyOkLink} from 'hast-util-is-body-ok-link'\n\nisBodyOkLink(h('link', {itemProp: 'foo'})) //=> true\nisBodyOkLink(h('link', {rel: ['stylesheet'], href: 'index.css'})) //=> true\nisBodyOkLink(h('link', {rel: ['author'], href: 'index.css'})) //=> false\n```\n\n## API\n\nThis package exports the identifier\n`isBodyOkLink`.\nThere is no default export.\n\n### `isBodyOkLink(node)`\n\nCheck whether a node is a “body OK” link.\n\nThe following nodes are “body OK” links:\n\n*   `link` elements with an `itemProp`\n*   `link` elements with a `rel` list where one or more entries are\n    `pingback`, `prefetch`, or `stylesheet`\n\n###### Parameters\n\n*   `node` (`Node`) — node to check.\n\n###### Returns\n\nWhether a node is a “body OK” link (`boolean`).\n\n## Syntax\n\nHTML is parsed according to WHATWG HTML (the living standard), which is also\nfollowed by all browsers.\n\n## Syntax tree\n\nThe syntax tree used is [hast][].\n\n## Types\n\nThis package is fully typed with [TypeScript][].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line,\n`hast-util-is-body-ok-link@^3`,\ncompatible with Node.js 16.\n\n## Security\n\nAs **rehype** works on HTML and improper use of HTML can open you up to a\n[cross-site scripting (XSS)][xss] attack, use of rehype can also be unsafe.\nUse [`rehype-sanitize`][rehype-sanitize] to make the tree safe.\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[author]: https://wooorm.com\n\n[build]: https://github.com/rehypejs/rehype-minify/actions\n\n[build-badge]: https://github.com/rehypejs/rehype-minify/workflows/main/badge.svg\n\n[chat]: https://github.com/rehypejs/rehype/discussions\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[coc]: https://github.com/rehypejs/.github/blob/main/code-of-conduct.md\n\n[contributing]: https://github.com/rehypejs/.github/blob/main/contributing.md\n\n[coverage]: https://codecov.io/github/rehypejs/rehype-minify\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/rehypejs/rehype-minify.svg\n\n[downloads]: https://www.npmjs.com/package/hast-util-is-body-ok-link\n\n[downloads-badge]: https://img.shields.io/npm/dm/hast-util-is-body-ok-link.svg\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esm-sh]: https://esm.sh\n\n[funding]: https://opencollective.com/unified\n\n[funding-backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[funding-sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[hast]: https://github.com/syntax-tree/hast\n\n[health]: https://github.com/rehypejs/.github\n\n[license]: https://github.com/rehypejs/rehype-minify/blob/main/license\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[rehype-sanitize]: https://github.com/rehypejs/rehype-sanitize\n\n[size]: https://bundlejs.com/?q=hast-util-is-body-ok-link\n\n[size-badge]: https://img.shields.io/bundlejs/size/hast-util-is-body-ok-link\n\n[support]: https://github.com/rehypejs/.github/blob/main/support.md\n\n[typescript]: https://www.typescriptlang.org\n\n[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting\n","publish_time":1584815245045,"_cnpm_publish_time":1584815245045,"dist-tags":{"latest":"3.0.1"}}