INNER CODE UNIT · JavaScript
warn
mermaid-js/mermaid-cli · src/index.js:74
const warn = (message) => {
console.warn(chalk.yellow(`\n${message}\n`));
};
/**
* Checks if the given file exists.
*
* @param {string} file - The file to check.
* @returns {never | void} If the file doesn't exist, closes Node.JS with
* exit code 1.
*/
const checkConfigFile = (file) => {
if (!fs.existsSync(file)) {
error(`Configuration file "${file}" doesn't exist`);
}
};
/**