UNPKG

btnexus-hook

Version:
44 lines (39 loc) 983 B
/** * btNexus Hook, Utility functionality * @author Marc Fiedler * @copyright 2020 Blackout Technologies */ // Use Strict mode ECMA Script 5+ "use_strict"; // 3rd party imports const chalk = require('chalk'); module.exports = class HookUtility { error(options, error){ if( this.onError != undefined ){ this.onError(error, options); }else{ console.log( chalk.green("[")+ chalk.blue("btNexus Hook")+ chalk.green("]")+": "+ chalk.red(error) ); console.dir(options); } } info(text){ console.log( chalk.green("[")+ chalk.blue("btNexus Hook")+ chalk.green("] ")+": "+text ) } warning(text){ console.log( chalk.yellow("[")+ chalk.blue("btNexus Hook")+ chalk.yellow("] ")+": "+ chalk.yellow(text) ) } }