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'})) //=> true
ok(h('link', {rel: ['stylesheet'], href: 'index.css'})) //=> true
ok(h('link', {rel: ['author'], href: 'index.css'})) //=> false
API
isBodyOkLink(node)
- Return
true
forlink
elements with anitemProp
- Return
true
forlink
elements with arel
list where one or more entries arepingback
,prefetch
, orstylesheet
.
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.