INNER CODE UNIT · JavaScript
error
mermaid-js/mermaid-cli · src/index.js:64
const error = (message) => {
console.error(chalk.red(`\n${message}\n`));
process.exit(1);
};
/**
* Prints a warning to stderr.
*
* @param {string} message - The message to print to `stderr`.
*/
const warn = (message) => {
console.warn(chalk.yellow(`\n${message}\n`));
};
/**
* Checks if the given file exists.
*
* @param {string} file - The file to check.