unclosed-markup

v1.1.0
check markup for unclosed tags
html html5 validator markup tags lint htmllint unclosed

Unclosed-markup

Build Status

parse5 backed unclosed markup checker that works offline.

Requires node version 6.

Usage api



const check = require('unclosed-markup');

// input as a string
check('<div><a></div>')
    .then(() => {})
    .catch(errors => console.error(errors));

// or input as a readstream
check(readstream)
    .then(() => {})
    .catch(errors => console.error(errors));

// arrays are also supported
check(['<div><a></div>', '<div><a></div>'])
    .then(() => {})
    .catch(errors => console.error(errors));

Usage cli

$ unclosed-markup ./path/to/file

$ unclosed-markup --content="<div>asd</div>"
npm i unclosed-markup

Metadata

Downloads

Maintainers