Navigator Prefabricating Marinates
Miss any of our Open RFC calls?Watch the recordings here! »

hast-util-is-body-ok-link

1.0.4 • Public • Published

hast-util-is-body-ok-link

Build Coverage Downloads Size Sponsors Backers Chat

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 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

Install

npm i hast-util-is-body-ok-link

DownloadsWeekly Downloads

70,807

Version

1.0.4

License

MIT

Unpacked Size

4.69 kB

Total Files

3

Last publish

Collaborators

  • avatar
  • avatar