Skip to content

Instantly share code, notes, and snippets.

View bswerd's full-sized avatar

Brad Swerdfeger bswerd

  • League
  • Burlington, ON
View GitHub Profile
@bswerd
bswerd / checkParams.js
Created December 1, 2010 23:04
Checks the parameters of a function with a specification that involves optional parameters.
/**
* Contains utility functions to be used in various places.
*/
var util = {};
/**
* Checks the types and sanitizes arguments for functions with optional
* parameters and default values.
*