Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (doc.kind == "class" && doc.scope == "global") part.addClass(doc.name, doc)
else if (doc.kind == "function" && doc.memberof && !doc.memberof.startsWith("module") && !doc.memberof.startsWith("") && !doc.longname.startsWith("module") && !doc.longname.startsWith("")) part.addMember(doc.longname, doc)
else log("Unknown", doc.kind, doc.scope, doc.longname)
})
})
log("rendering")
let res = docs.render(parts)
if (res.getAll().length < 4) res = rend() //Remove API header if there are no docs or just empty class docs
res.add(conf.footer || "Docs are autogenerated by a script", true)
return cb(null, res.toString())
} catch (e) {
return cb(e)
}
}
jsdoc2md.getJsdocData({
files,
jsdoc: true
})
.then(jsdoc => {
process.nextTick(d, jsdoc)
})
.catch(cb)
}