Sha256: 840274403f9055927e00e118169b80ed6e7923ee5ed0036d77590162ef574a4d

Contents?: true

Size: 644 Bytes

Versions: 25

Compression:

Stored size: 644 Bytes

Contents

((has_console)->
  
  # TODO: Implement all the other usual console tricks
  log_methods= if has_console
    log: ->
      console.log arguments...
    warn: ->
      console.warn arguments...
    error: ->
      console.error arguments...
    info: ->
      console.info arguments...
  else
    # Create a bunch of NOOPs
    # TODO: Decide if a fallback to non-console folks should be provided? (I'm thinking no.)
    log: -> # noop
    warn: -> # noop
    error: -> # noop
    info: -> # noop
  
  module.exports= log_methods
  module.exports.globalize= (ctx=window)->
    for name, fn of log_methods
      ctx[name]= fn

)(window.console?)

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
gumdrop-0.8.0 templates/backbone/app/utils/index.js.coffee
gumdrop-0.7.5 templates/backbone/app/utils/index.js.coffee
gumdrop-0.7.4 templates/backbone/app/utils/index.js.coffee
gumdrop-0.7.3.1 templates/backbone/app/utils/index.js.coffee
gumdrop-0.7.3 templates/backbone/app/utils/index.js.coffee
gumdrop-0.7.2 templates/backbone/app/utils/index.js.coffee
gumdrop-0.7.1 templates/backbone/app/utils/index.js.coffee
gumdrop-0.7.0 templates/backbone/app/utils/index.js.coffee
gumdrop-0.6.4 templates/backbone/app/utils/index.js.coffee
gumdrop-0.6.3 templates/backbone/app/utils/index.js.coffee
gumdrop-0.6.2 templates/backbone/app/utils/index.js.coffee
gumdrop-0.6.1 templates/backbone/app/utils/index.js.coffee
gumdrop-0.6.0 templates/backbone/app/utils/index.js.coffee
gumdrop-0.5.2 templates/backbone/app/utils/index.js.coffee
gumdrop-0.5.1 templates/backbone/app/utils/index.js.coffee
gumdrop-0.5 templates/backbone/app/utils/index.js.coffee
gumdrop-0.4.0 lib/gumdrop/template/backbone/app/utils/index.js.coffee
gumdrop-0.3.10 lib/gumdrop/template/backbone/app/utils/index.js.coffee
gumdrop-0.3.9 lib/gumdrop/template/backbone/app/utils/index.js.coffee
gumdrop-0.3.8 lib/gumdrop/template/backbone/app/utils/index.js.coffee