INNER CODE UNIT · JavaScript
printInfo
macacajs/app-inspector · bin/app-inspector.js:34
const printInfo = function(lines) {
let maxLength = 0;
lines.forEach(line => {
maxLength = line.length > maxLength ? line.length : maxLength;
});
const res = [ new Array(maxLength + 7).join('*') ];
lines.forEach(line => {
res.push(`* ${line + new Array(maxLength - line.length + 1).join(' ')} *`);
});
res.push(new Array(maxLength + 7).join('*'));
console.log(chalk.white(`${EOL}${res.join(EOL)}${EOL}`));
};
// eslint-disable-next-line handle-callback-err
function init(error, data) {