Check if a node is an embedded element.
npm:
npm install hast-util-embeddedvar embedded = require('hast-util-embedded')
// Given a non-embedded value:
embedded({
type: 'element',
tagName: 'a',
properties: {href: '#alpha', title: 'Bravo'},
children: [{type: 'text', value: 'Charlie'}]
}) // => false
// Given a embedded element:
embedded({
type: 'element',
tagName: 'audio',
properties: {src: 'delta.ogg'},
children: []
}) // => trueCheck if the given value is an embedded element.
See contributing.md in syntax-tree/hast for ways to get
started.
This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.