hast utility to check if an element is sectioning.
npm:
npm install hast-util-sectioning
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
Check if the given value is a sectioning element.
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.
hast-util-sectioning
does not change the syntax tree so there are no openings
for cross-site scripting (XSS) attacks.