Skip to content

Leftium/gg

Repository files navigation

gg: never use console.log() to debug again!

gg() is a logger/debugger with several advantages:

  • Annotated with automatic namespace based on source file and calling function.
    • Each namespace gets a unique color for easier visual parsing.
    • Simple syntax with wildcards to filter/hide debug output at runtime.
    • Millisecond diff (timestamps) for each namespace.
  • Can be inserted into the middle of expressions (returns the value of the first argument).
  • Can output a link that opens the source file in your editor (like VS Code).
  • Simple to disable (turn all loggs into NOP's for production).
  • Diagnostics/hints in dev console & terminal to help install and configure correctly.
  • Faster to type.

Installation

npm add @leftium/gg

Usage

Coming soon...

Inspirations

debug

A tiny JavaScript debugging utility modelled after Node.js core's debugging technique. Works in Node.js and web browsers.

q (python)

Quick and dirty debugging output for tired programmers.

IceCream (python)

Never use print() to debug again

About

gg: never use console.log() to debug again!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published