A cross-environment fix for missing methods.


Keywords
console, logger, module, javascript, nodejs, browser, logging
License
MIT
Install
npm install cross-console-x@4.1.2

Documentation

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

cross-console-x

A cross-environment fix for missing methods.

module.exports

The cross-console-x object provides access to the browser's debugging console (e.g., the Web Console in Firefox). The specifics of how it works vary from browser to browser, but there is a de facto set of features that are typically provided.

Missing methods are shimmed when possible, otherwise they provide no operation.

Additional stamp() method provided. A thin wrapper to any method that prepends a timestamp.

Kind: Exported member
See: https://developer.mozilla.org/en/docs/Web/API/console
Example

import con from 'cross-console-x';

con.log('hi');
con.stamp('log', 'hi');