Created
August 8, 2014 18:09
-
-
Save craigmdennis/e363f950951e4a9aca47 to your computer and use it in GitHub Desktop.
Object Literal Function Boilerplate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Call the function with
window.Upload.init( )