Skip to content

Instantly share code, notes, and snippets.

@craigmdennis
Created August 8, 2014 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craigmdennis/e363f950951e4a9aca47 to your computer and use it in GitHub Desktop.
Save craigmdennis/e363f950951e4a9aca47 to your computer and use it in GitHub Desktop.
Object Literal Function Boilerplate
'use strict'
Upload =
init: (options) ->
# Set some default options
defaults =
debug: false
# Merge all the options
Upload.options = $.extend defaults, options
# Bind Event Handlers
Upload.bind()
bind: ->
log: ( msg, object ) ->
if Filter.options.debug
if !object
object = ''
console.log( 'Upload: ' + msg, object )
@craigmdennis
Copy link
Author

Call the function with window.Upload.init( )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment