@philipasdf/pretty-log
v1.2.2
Published
Pretty and fast logging for javascript console logs. Useful for debugging with browser console.
Downloads
2
Readme
pretty-log
why?
For debugging in the browser console. Sometimes there are so many console.logs that you cannot see the forest cause of all the trees (that's a German saying horribly translated :P).
let's see
import { L } from '@philipasdf/pretty-log';
// pass a json object with a string message
L.log(this.appConfig.languages, 'languages');
// style your log
L.r().xl().log(this.oneSignal.OSInFocusDisplayOption, 'does this work?');
// passing only a message
L.g().log('app loaded!');
how?
- I tried to make using pretty-log easy and fast with a chainable class. Get the chainable class by calling the instance 'L'. I also added more instances LL, PL and PP because sometimes L is hard to auto-import by the IDE.
L
LL
PL
PP
- Call any chain method. Chaining multiple colors affects only one color.
// red
L.r()
// green
L.g()
// big font-size
L.xl()
- Call log() at the end of the chain.
L.r().xl().log()
// per default the log text is 'test'
- Shortcut. There is also an alias for log. You can call log without calling the instance L before.
log()
other prints
For following prints you don't need the instance L. These are extra exported functions.
line();
tableFlip();
tableUnflip();
middleFinger();
note for me
npm run build
npm publish --access public
ascii emoji arts are AI generated with CodePilot.