Skip to content

Instantly share code, notes, and snippets.

@wilsonpage
Created April 13, 2015 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wilsonpage/ecfcd25203cc7ca91851 to your computer and use it in GitHub Desktop.
Save wilsonpage/ecfcd25203cc7ca91851 to your computer and use it in GitHub Desktop.
function MyClass(external) {
this.external = external;
}
MyClass.prototype.publicMethod = function() {};
MyClass.prototype.privateMethod = function() {};
module.exports = function () {
var myClass = new MyClass(this);
return { publicMethod: myClass.public.bind(myClass) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment