INNER CODE UNIT · JavaScript
logSuccess
waylaidwanderer/node-chatgpt-api · bin/cli.js:297
function logSuccess(message) {
console.log(tryBoxen(message, {
title: 'Success', padding: 0.7, margin: 1, borderColor: 'green',
}));
}
function logWarning(message) {
console.log(tryBoxen(message, {
title: 'Warning', padding: 0.7, margin: 1, borderColor: 'yellow',
}));
}
/**
* Boxen can throw an error if the input is malformed, so this function wraps it in a try/catch.
* @param {string} input
* @param {*} options
*/
function tryBoxen(input, options) {