Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
log._format = function (msg, style) {
if (!stream) return
var output = ''
if (this.useColor()) {
style = style || {}
var settings = []
if (style.fg) settings.push(style.fg)
if (style.bg) settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1))
if (style.bold) settings.push('bold')
if (style.underline) settings.push('underline')
if (style.inverse) settings.push('inverse')
if (settings.length) output += consoleControl.color(settings)
if (style.beep) output += consoleControl.beep()
}
output += msg
if (this.useColor()) {
output += consoleControl.color('reset')
}
return output
}
log._format = function (msg, style) {
if (!stream) return
var output = ''
if (this.useColor()) {
style = style || {}
var settings = []
if (style.fg) settings.push(style.fg)
if (style.bg) settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1))
if (style.bold) settings.push('bold')
if (style.underline) settings.push('underline')
if (style.inverse) settings.push('inverse')
if (settings.length) output += consoleControl.color(settings)
if (style.beep) output += consoleControl.beep()
}
output += msg
if (this.useColor()) {
output += consoleControl.color('reset')
}
return output
}
log._format = function (msg, style) {
if (!stream) return
var output = ''
if (this.useColor()) {
style = style || {}
var settings = []
if (style.fg) settings.push(style.fg)
if (style.bg) settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1))
if (style.bold) settings.push('bold')
if (style.underline) settings.push('underline')
if (style.inverse) settings.push('inverse')
if (settings.length) output += consoleControl.color(settings)
if (style.beep) output += consoleControl.beep()
}
output += msg
if (this.useColor()) {
output += consoleControl.color('reset')
}
return output
}
log._format = function (msg, style) {
if (!stream) return
var output = ''
if (this.useColor()) {
style = style || {}
var settings = []
if (style.fg) settings.push(style.fg)
if (style.bg) settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1))
if (style.bold) settings.push('bold')
if (style.underline) settings.push('underline')
if (style.inverse) settings.push('inverse')
if (settings.length) output += consoleControl.color(settings)
if (style.beep) output += consoleControl.beep()
}
output += msg
if (this.useColor()) {
output += consoleControl.color('reset')
}
return output
}
log._format = function (msg, style) {
if (!stream) return
var output = ''
if (this.useColor()) {
style = style || {}
var settings = []
if (style.fg) settings.push(style.fg)
if (style.bg) settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1))
if (style.bold) settings.push('bold')
if (style.underline) settings.push('underline')
if (style.inverse) settings.push('inverse')
if (settings.length) output += consoleControl.color(settings)
if (style.beep) output += consoleControl.beep()
}
output += msg
if (this.useColor()) {
output += consoleControl.color('reset')
}
return output
}
log._format = function (msg, style) {
if (!stream) return
var output = ''
if (this.useColor()) {
style = style || {}
var settings = []
if (style.fg) settings.push(style.fg)
if (style.bg) settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1))
if (style.bold) settings.push('bold')
if (style.underline) settings.push('underline')
if (style.inverse) settings.push('inverse')
if (settings.length) output += consoleControl.color(settings)
if (style.beep) output += consoleControl.beep()
}
output += msg
if (this.useColor()) {
output += consoleControl.color('reset')
}
return output
}