
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
match-html
Advanced tools
Check HTML consistency according to a model
Ok, here it goes:
import matchHTML from 'match-html'
// or const matchHTML = require('mach-html')
const model = `
<header>
<h1 acceptTags="h2|h3|h4"></h1>
</header>
<main class="content" attribute="value" >
<nav childCount="2">
<a></a>
<a></a>
</nav>
</main>
<footer>
<span acceptTags="*"></span>
</footer>
`
const isValid = matchHTML(model, input) // true or false
p.s: matchHTML handles whitespace
childCount: how many childs the node should haveacceptTags: which tags the node can be; delimit with |; * = any tagp.s: Any other attribute that is not listed above will take place in the matching
FAQs
Check html consistency according to a model
The npm package match-html receives a total of 0 weekly downloads. As such, match-html popularity was classified as not popular.
We found that match-html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.