Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 791 Bytes

README.md

File metadata and controls

39 lines (25 loc) · 791 Bytes

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>"