Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(content => {
const MJMLDocument = documentParser(content.toString())
const body = find(MJMLDocument.children, ['tagName', 'mj-body'])
if (!body || body.children.length == 0) {
return;
}
const report = MJMLValidator(body.children[0])
const outputFormat = availableErrorOutputFormat[format] || availableErrorOutputFormat['text']
error(outputFormat(report))
})
.catch(e => {