Skip to content

Instantly share code, notes, and snippets.

@DCarper
Created March 23, 2011 19:56
Show Gist options
  • Select an option

  • Save DCarper/883825 to your computer and use it in GitHub Desktop.

Select an option

Save DCarper/883825 to your computer and use it in GitHub Desktop.
var default_options = {};
var hamsterDance = function(options) {
options = options || {};
options.merge(default_options)
// make the hamsters dance with appropriate options
}
// where i would google around for the best merge technique available since there doesn't seem to be a pattern for that either
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment