hast-util-is-body-ok-link
hast utility to check if a link element is “Body OK”
Last updated 4 months ago by wooorm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hast-util-is-body-ok-link 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.4                                ...           latest (4 months ago)

5 Versions

  • 1.0.4                                ...           4 months ago
  • 1.0.3                                ...           7 months ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (2)
Downloads
Today 20
This Week 514
This Month 2,014
Last Day 117
Last Week 823
Last Month 3,233
Dependencies (2)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |