unclosed-markup
v1.1.0
Published
check markup for unclosed tags
Downloads
10
Maintainers
Readme
Unclosed-markup
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>"