Check if a mdast node is phrasing content.
This package is ESM only:
Node 12+ is needed to use it and it must be import
ed instead of require
d.
npm:
npm install mdast-util-phrasing
import {phrasing} from 'mdast-util-phrasing'
phrasing({
type: 'paragraph',
children: [{type: 'text', value: 'Alpha'}]
}) // => false
phrasing({
type: 'strong',
children: [{type: 'text', value: 'Delta'}]
}) // => true
This package exports the following identifiers: phrasing
.
There is no default export.
Check if the given value is a phrasing element.
node
(*
) — Value to check, typically a node.
boolean
— whether node
is phrasing content.
Use of mdast-util-phrasing
does not involve hast, user content,
or change the tree, so there are no openings for
cross-site scripting (XSS) attacks.
hast-util-phrasing
— check if a hast node is phrasing contentunist-util-is
— check if a node passes a test
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.