1
0
Fork 0

sparkles: Added ability to format message prefix

This commit is contained in:
Joost De Cock 2018-09-05 16:48:26 +02:00
parent be79f77940
commit 6105b18467
2 changed files with 19 additions and 10 deletions

View file

@ -1,4 +1,2 @@
src
.editorconfig
rollup.browser.js
rollup.node.js

View file

@ -5,15 +5,26 @@ export default {
version: version,
hooks: {
debug: function(next, d = "", e = "", b = "", u = "", g = "") {
console.log(
"%cDebug",
"color: #dd69dd; font-weight: bold",
d,
e,
b,
u,
g
if(typeof d === 'object' && d.debug === 'custom') {
console.log(
"%c"+d.text,
d.style,
e,
b,
u,
g
);
} else {
console.log(
"%cDebug",
"color: #dd69dd; font-weight: bold",
d,
e,
b,
u,
g
);
}
next();
}
}