Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

hast-util-sectioning

1.0.4 • Public • Published

hast-util-sectioning

Build Coverage Downloads Size Sponsors Backers Chat

hast utility to check if an element is sectioning.

Install

npm:

npm install hast-util-sectioning

Use

var sectioning = require('hast-util-sectioning')
 
sectioning({
  type: 'element',
  tagName: 'a',
  properties: {href: '#alpha', title: 'Bravo'},
  children: [{type: 'text', value: 'Charlie'}]
}) // => false
 
sectioning({
  type: 'element',
  tagName: 'article',
  children: [
    {
      type: 'element',
      tagName: 'p',
      children: [{type: 'text', value: 'Delta'}]
    }
  ]
}) // => true

API

sectioning(node)

Check if the given value is a sectioning element.

Contribute

See contributing.md in syntax-tree/.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.

Security

hast-util-sectioning does not change the syntax tree so there are no openings for cross-site scripting (XSS) attacks.

License

MIT © Titus Wormer

Install

npm i hast-util-sectioning

DownloadsWeekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

6.17 kB

Total Files

4

Last publish

Collaborators

  • avatar
  • avatar