Skip to content

Instantly share code, notes, and snippets.

@TimBeyer
Last active December 22, 2015 00:29
Show Gist options
  • Save TimBeyer/6389908 to your computer and use it in GitHub Desktop.
Save TimBeyer/6389908 to your computer and use it in GitHub Desktop.
var uuid = require('node-uuid');
var _ = require('lodash');
var privates = {};
function MyClass () {
this.id = uuid.v4();
privates[this.id].foobar = 'somethingprivate';
};
_.extend(MyClass.prototype, {
foo: function () {
return privates[this.id].foobar;
}
});
module.exports = MyClass;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment