Skip to content

Instantly share code, notes, and snippets.

@TimPietrusky
Last active August 29, 2015 14:06
Show Gist options
  • Save TimPietrusky/602aeee23b6f58188b35 to your computer and use it in GitHub Desktop.
Save TimPietrusky/602aeee23b6f58188b35 to your computer and use it in GitHub Desktop.
JavaScript - Skeleton - Object
// Constructor
function ClassName(args) {
this.option = args.option || default_value;
}
// Define propertys and functions
ClassName.prototype = {
constructor : ClassName,
methodName : function() {
}
};
// Export ClassName
// module.exports = new ClassName();
// Create a new instance of ClassName
// var myClass = new ClassName({ option: 'value' });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment