hast-util-is-body-ok-link
Check if a link
element is “Body OK”.
Install
This package is ESM only:
Node 12+ is needed to use it and it must be imported
ed instead of required
d.
npm:
npm install hast-util-is-body-ok-link
This package exports the following identifiers:
isBodyOkLink
.
There is no default export.
Use
import {h} from 'hastscript'
import {isBodyOkLink} from 'hast-util-is-body-ok-link'
isBodyOkLink(h('link', {itemProp: 'foo'}))
isBodyOkLink(h('link', {rel: ['stylesheet'], href: 'index.css'}))
isBodyOkLink(h('link', {rel: ['author'], href: 'index.css'}))
API
isBodyOkLink(node)
- Return
true
for link
elements with an itemProp
- Return
true
for link
elements with a rel
list where one or more
entries are pingback
, prefetch
, or stylesheet
.
Contribute
See contributing.md
in rehypejs/.github
for ways
to get started.
See support.md
for ways to get help.
This project has a code of conduct.
By interacting with this repository, organization, or community you agree to
abide by its terms.
License
MIT © Titus Wormer