A simple augmentation of the built-in console object in the browser.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
src
.gitignore
Gruntfile.js
LICENSE.md
README.md
bower.json
example.html
package.json

README.md

console.real

A simple augmentation of the built-in console object in the browser. Console.real will log objects as they ware at the time of logging and not as they are at the time you inspect the log line in the console. See my blog post console.log() is not a log for details.

Usage

Include the build/console.real.min.js file into your web page. Then you can call the following methods on the console.real object in the same way as regular console methods: log, info, warn, error.

You can also call console.real.install() which will replace the console methods with the augmented ones.

Notes

Internally every passed argument is deep cloned, which means there are performance penalties for using this.

Browser support

Should work in ES5 compliant browsers that have: console, JSON, Array#forEach and Array#map objects/methods.

License

Licensed under MIT. See LICENSE.md file for details.