INNER CODE UNIT · JavaScript
viz
clinicjs/node-clinic · bin.js:450
function viz (toolName, filename, cb) {
// Before getting to the tool, make sure the filename exists. We don't care whether is a file or a directory.
fs.access(filename, function (err) {
if (err) {
return cb(new Error('No data found.'))
}
const html = filename + '.html'
tool.visualize(filename, html, function (err) {
if (err) return cb(err)
hash(html, function (err, h) {
/* istanbul ignore next */ if (err) return cb(err)
const info = {
tool: toolName,
toolVersion: version,
hash: h.toString('hex')
}