Skip to content

Instantly share code, notes, and snippets.

@Kelderic
Last active December 28, 2018 15:53
Show Gist options
  • Save Kelderic/56cd1d4fd302c31cc57ff1d8ec2bf96e to your computer and use it in GitHub Desktop.
Save Kelderic/56cd1d4fd302c31cc57ff1d8ec2bf96e to your computer and use it in GitHub Desktop.
Javascript Class Skeleton
(function(window) {
window.FooBarClass = (function() {
/***************************************/
/************* INITIALIZE **************/
/***************************************/
var Class = function( params ) {
// DO SETUP STUFF HERE
};
/***************************************/
/********** PUBLIC FUNCTIONS ***********/
/***************************************/
Class.prototype.doPublicThings = function() {
// DO STUFF
};
/***************************************/
/********** PRIVATE FUNCTIONS **********/
/***************************************/
function doPrivateThings( variable ) {
// DO STUFF
}
return Class;
}());
}(window));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment