8000 GitHub - syntax-tree/hast-util-script-supporting at 1.0.1
[go: up one dir, main page]

Skip to content

syntax-tree/hast-util-script-supporting

hast-util-script-supporting Build Status Coverage Status

Check if a HAST node is a script-supporting element.

Installation

npm:

npm install hast-util-script-supporting

Usage

var scriptSupporting = require('hast-util-script-supporting')

scriptSupporting({
  type: 'element',
  tagName: 'a',
  properties: {href: '#alpha', title: 'Bravo'},
  children: [{type: 'text', value: 'Charlie'}]
}) // => false

scriptSupporting({
  type: 'element',
  tagName: 'template',
  children: [{type: 'text', value: 'Delta'}]
}) // => true

API

scriptSupporting(node)

Check if the given value is a script-supporting element.

Contribute

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.

License

MIT © Titus Wormer

About

utility to check if a node is a script-supporting element

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 2

  •  
  •  
0