Skip to content

Instantly share code, notes, and snippets.

View andyman3000's full-sized avatar

Andreas Stephan andyman3000

View GitHub Profile
@andyman3000
andyman3000 / gist:5299459
Created April 3, 2013 08:30
Module pattern for CoffeeScript
app = ((app) ->
priv = ->
console.log "private func"
app.pub = ->
console.log "public func"
priv()
app
)((if typeof app is "undefined" then {} else app))