Skip to content

Instantly share code, notes, and snippets.

View riovv's full-sized avatar

riovv

  • Digital Illusions CE (DICE)
  • Sweden
View GitHub Profile
@richthegeek
richthegeek / debug.coffee
Created September 27, 2012 21:55
Node debugging functions
global.debug = ( ) ->
tabs = ( n ) -> ( "\t" for i in [0...n] ).join( '' )
for i in [0...arguments.length]
arg = arguments[i]
type = get_type arg
# last arg is boolean? sleep if true
if ( i + 1 ) is arguments.length and type is 'Boolean'
if arg