Skip to content

syntax-tree/hast-util-script-supporting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

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

  •  
  •