hast-util-script-supporting
hast utility to check if a node is a script-supporting element
Last updated 8 months ago by wooorm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hast-util-script-supporting 
SYNC missed versions from official npm registry.

hast-util-script-supporting

Build Coverage Downloads Size Sponsors Backers Chat

hast utility to check if an element is script-supporting.

Install

npm:

npm install hast-util-script-supporting

Use

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.

Security

hast-util-script-supporting does not change the syntax tree so there are no openings for cross-site scripting (XSS) attacks.

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

License

MIT © Titus Wormer

Current Tags

  • 1.0.4                                ...           latest (8 months ago)

5 Versions

  • 1.0.4                                ...           8 months ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |