Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add instance-level private object. Bump version

  • Loading branch information...
commit 8f5c55f613e14c1ed0f088056c7f8f1223c518d9 1 parent 0b70a28
Dan Dean authored
Showing with 7 additions and 1 deletion.
  1. +6 −0 lib/model.js
  2. +1 −1  package.json
6 lib/model.js
View
@@ -57,6 +57,12 @@ function Tubbs(data) {
Tubbs.prototype = Object.create(EventEmitter2.prototype);
Object.defineProperties(Tubbs.prototype, {
+
+ // Create an instance-level "private" object at runtime.
+ __private: {
+ get: function() { return this.__private = {}; }
+ },
+
// Define 'fields' object on Tubbs base. Model class's `fields' property will
// use this as their __proto__ object.
fields: {
2  package.json
View
@@ -2,7 +2,7 @@
"author": "Dan Dean <@dandean> (http://dandean.com)",
"name": "tubbs",
"description": "Models with an API that I actually like.",
- "version": "0.0.8",
+ "version": "0.0.9",
"repository": {
"type": "git",
"url": "git://github.com/dandean/tubbs.git"
Please sign in to comment.
Something went wrong with that request. Please try again.