unified

Project: rehypejs/rehype-minify

Package: hast-util-is-body-ok-link@1.0.4

  1. Dependencies: 2·Dependents: 2
  2. hast utility to check if a link element is “Body OK”
  1. util 106
  2. html 106
  3. utility 104
  4. unist 97
  5. hast 59
  6. hast-util 40
  7. link 13

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)

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