Skip to content

Instantly share code, notes, and snippets.

@kaihowl
Created November 26, 2012 12:43
Show Gist options
  • Save kaihowl/4148016 to your computer and use it in GitHub Desktop.
Save kaihowl/4148016 to your computer and use it in GitHub Desktop.
MYAPP.namespace("MYAPP.utils.set");
MYAPP.utils.set = (function() {
// dependencies
var someDep = OTHERLIB.util.collections,
// private properties
privateVar = "private",
// methods
privateMethod = function() {
...
},
union = function() { ... },
intersection = function() { ... },
difference = function() { ... };
// end var
// one-time init procedures
// public API
return {
union: union,
intersection: intersection,
difference: difference
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment