Debug Lite
A very tiny Javascript debugging utility. It's inspired by debug but for only be used on browsers.
File size
package | minified | gzipped |
---|---|---|
debug (browser) | 7.67KB | 3.05KB |
debug-lite | 1.37KB | 661 bytes |
Files was minified using https://closure-compiler.appspot.com/home .
Installation
$ npm install debug-lite
Usage
For browser globals:
- Using
debug-lite.umd.min.js
file and usewindow.debugLite.createDebug
function.
For bundlers like Webpack or Browserify:
- Using as module
import { createDebug } from 'debug-lite'
Example
// import { createDebug } from 'debug-lite';const createDebug = createDebug; const log = ;const logInit = ;const logBuild = ; { ;} { ;} { ; ; ;} ;
Open console and try:
localStorageDEBUG = '*';location;
You can found a complete example here.
License
MIT