npm

Need private packages and team management tools?Check out npm Orgs. »

hast-util-sectioning

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

Usage

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, organisation, or community you agree to abide by its terms.

License

MIT © Titus Wormer

install

npm i hast-util-sectioning

Downloadsweekly downloads

9

version

1.0.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability