mirror of
https://github.com/Rushilwiz/spaceout.git
synced 2025-04-22 12:29:50 -04:00
12 lines
227 B
JavaScript
12 lines
227 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
|