Skip to content

Instantly share code, notes, and snippets.

@hmps
Created March 11, 2014 08:41
Show Gist options
  • Select an option

  • Save hmps/9481758 to your computer and use it in GitHub Desktop.

Select an option

Save hmps/9481758 to your computer and use it in GitHub Desktop.
var module = function() {
'use strict';
var _p = {}; // Prepare for our private API
_p.privateFunction = function privateFunction() {
}
_p.anotherPrivateFunction = function removeClass() {
}
return {
_p: _p, // Private variables
publicFunction: function() {
_p.privateFunction();
},
anotherPublicFunction: function() {
_p.anotherPrivateFunction();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment