mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-18 11:39:15 +00:00
15 lines
403 B
JavaScript
15 lines
403 B
JavaScript
const { yellow, bgRed } = require('kleur')
|
|
const NODE_ENV = process.env.NODE_ENV || 'dev'
|
|
const printer = (message, title) => {
|
|
if (NODE_ENV !== 'test') {
|
|
// console.clear()
|
|
if (title) console.log(bgRed(`${title}`))
|
|
console.log(
|
|
yellow(Array.isArray(message) ? message.join('\n') : message)
|
|
)
|
|
console.log(``)
|
|
}
|
|
}
|
|
|
|
module.exports = { printer }
|