1.2.2 • Published 9 months ago

@philipasdf/pretty-log v1.2.2

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

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!');

screenshot

how?

  1. 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
  1. Call any chain method. Chaining multiple colors affects only one color.
// red
L.r()

// green
L.g()

// big font-size
L.xl()
  1. Call log() at the end of the chain.
L.r().xl().log()

// per default the log text is 'test'
  1. 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.

1.2.2

9 months ago

1.2.1

9 months ago

1.2.0

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago