2024-06-20 00:45:01 +03:00

12 lines
225 B
JavaScript

function chalkFormat (str) {
if (str) {
str = str.replace(/`/g, '\\`')
const chalk = require('chalk')
return chalk(Object.assign([], { raw: [str] }))
} else {
return ''
}
}
module.exports = chalkFormat