I'm trying to clone the functionality of a class in JS that has private functions, public functions and static public functions. I know patterns that provides public and private methods and vars for my classes, but I don't know how to add static methods to this patterns (Revealing pattern in most cases). Any lead to achieve this?
Thanks!
Edit:
Ok, I Know how to achieve a static method, but If I using a pattern like this, How could I create an static method?
var module = (function() {
return function(selector) {
var options = {
selector: selector
}
var privateFunction = function() {}
var publicFunction = function() {}
return {
public: publicFunction
}
}
})();