Last active
March 11, 2019 17:17
-
-
Save danielskapunk/65e394ff1ca577be710295fddc2207ef to your computer and use it in GitHub Desktop.
Revisions
-
danielskapunk revised this gist
Mar 11, 2019 . No changes.There are no files selected for viewing
-
danielskapunk revised this gist
Nov 17, 2017 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ { "name": "dconsole.js", "version": "0.1.0" } -
David Paul Rosser created this gist
Aug 18, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,61 @@ /** * console wrapper with line numbers * Usage: * import * as c from 'console' * c.log('abc'); * * Ref: https://matthewspencer.github.io/console-log/ */ /*eslint-disable */ const slice = [].slice; const enabled = window.location.hostname.indexOf('localhost') !== -1; export const log = function log() { if (!window.console || !console.log) { return function() {}; } if (!enabled) return function() {}; return Function.prototype.bind.call(console.log, console); }(); export const clear = function clear() { if (!window.console || !console.clear) { return function() {}; } if (!enabled) return function() {}; return Function.prototype.bind.call(console.clear, console); }(); export const debug = function debug() { if (!window.console || !console.debug) { return function() {}; } if (!enabled) return function() {}; return Function.prototype.bind.call(console.debug, console); }(); export const info = function info() { if (!window.console || !console.info) { return function() {}; } if (!enabled) return function() {}; return Function.prototype.bind.call(console.info, console); }(); export const warn = function warn() { if (!window.console || !console.warn) { return function() {}; } if (!enabled) return function() {}; return Function.prototype.bind.call(console.warn, console); }(); export const error = function error() { if (!window.console || !console.error) { return function() {}; } if (!enabled) return function() {}; return Function.prototype.bind.call(console.error, console); }(); /*eslint-enable */