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.3.7 lib/gumdrop/template/backbone/app/utils/index.js.coffee
gumdrop-0.3.6 lib/gumdrop/template/backbone/app/utils/index.js.coffee
gumdrop-0.3.5 lib/gumdrop/template/backbone/app/utils/index.js.coffee
gumdrop-0.3.4 lib/gumdrop/template/backbone/app/utils/index.js.coffee
gumdrop-0.3.3 lib/gumdrop/template/backbone/app/utils/index.js.coffee