Skip to content

Instantly share code, notes, and snippets.

@elentok
Created August 12, 2014 10:05
Show Gist options
  • Save elentok/08777f6570f544872396 to your computer and use it in GitHub Desktop.
Save elentok/08777f6570f544872396 to your computer and use it in GitHub Desktop.
Indented console.log
indent =
value: ''
increment: (args...) ->
@log args... if args?.length > 0
@value = "#{@value} "
decrement: (args...) ->
@value = @value.substring(0, @value.length - 2)
@log args... if args?.length > 0
log: (args...) ->
console.log "#{@value}", args...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment