hast-util-is-body-ok-link
Check if a link
element is “Body OK”.
Install
npm:
npm install hast-util-is-body-ok-link
Use
var h = require('hastscript')
var ok = require('hast-util-is-body-ok-link')
ok(h('link', {itemProp: 'foo'}))
ok(h('link', {rel: ['stylesheet'], href: 'index.css'}))
ok(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, organisation, or community you agree to
abide by its terms.
License
MIT © Titus Wormer