A few tools for making debug messages to the console more usable
const {D, I, E} = require( `@debonet/bugout` );
D("Hello World!");
D("Hello World!");
D("Hello Mars!");
D("Hello World!");
D("Hello World!");
D("Hello World!");
for (let n=0; n<1000; n++){
I(`I'm showing ${n}`);
}
D("Hello World!");
D("Hello World!");
for (let n=0; n<1000; n++){
D("HELLO WORLD!");
}
Yields output
Hello World! [ 2 times]
Hello Mars!
Hello World! [ 3 times]
Hello World! [ 2 times]
HELLO WORLD! [ 1000 times]
Running the same code above but substituting IKeep
for I
, e.g.:
const {D, IKeep : I, E} = require( `@debonet/bugout` );
will yield:
Hello World! [ 2 times]
Hello Mars!
Hello World! [ 3 times]
I'm showing 999
Hello World! [ 2 times]
HELLO WORLD! [ 1000 times]
prints values to standard out. If a line would be repeated exactly, instead of being printed again it simply gets "[ # times ]" appended to it
prints values to standard out, but overwrites any imediately preceeding output from an indicate()
call.
the same as I()
above, but ensures that the last line is kept
Currently this is exactly console.error
npm install @debonet/bugout