MCPcopy Index your code
hub / github.com/developit/htm / log

Function log

test/__d8.mjs:80–88  ·  view source on GitHub ↗
(type, msg)

Source from the content-addressed store, hash-verified

78wrap(console, 'error');
79
80function log(type, msg) {
81 if (type === 'ERROR') {
82 msg = `\u001b[31m${msg}\u001b[39m`;
83 }
84 if (type === 'SUCCESS') {
85 msg = `\u001b[32m${msg}\u001b[39m`;
86 }
87 print(Array.from({ length: stack.length }).fill(' ').join('') + msg);
88}
89
90function push(op, name, fn, extra) {
91 if (queue.push([op, name, fn, extra]) === 1) {

Callers 5

describeFunction · 0.85
doneFunction · 0.85
testFunction · 0.85
wrapFunction · 0.85
toBeGreaterThanMethod · 0.85

Calls

no outgoing calls

Tested by 2

describeFunction · 0.68
testFunction · 0.68