MCPcopy
hub / github.com/MithrilJS/mithril.js / cStyle

Function cStyle

ospec/ospec.js:306–308  ·  view source on GitHub ↗
(color, bold)

Source from the content-addressed store, hash-verified

304 return hasProcess ? (process.stdout.isTTY ? "\x1b[" + code + message + "\x1b[0m" : message) : "%c" + message + "%c "
305 }
306 function cStyle(color, bold) {
307 return hasProcess||!color ? "" : "color:"+color+(bold ? ";font-weight:bold" : "")
308 }
309 function ensureStackTrace(error) {
310 // mandatory to get a stack in IE 10 and 11 (and maybe other envs?)
311 if (error.stack === undefined) try { throw error } catch(e) {return e}

Callers 1

ospec.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected