electrolyte
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -65,2 +65,4 @@ // Load modules. | ||
Component.prototype.create = function(container, options) { | ||
options = options || {}; | ||
debug('create %s', this.id); | ||
@@ -99,3 +101,5 @@ | ||
if (this.singleton) { this._instance = i; } | ||
return i; | ||
// TODO: Make sure option is respected on cached singletons, etc | ||
return options.meta ? [ i, { implements: this.implements, a: this.a } ] : i; | ||
}.bind(this)); | ||
@@ -102,0 +106,0 @@ |
@@ -42,2 +42,9 @@ // Load modules. | ||
InjectedContainer.prototype.create = function(id, comp, options) { | ||
if (comp && comp.meta) { | ||
options = comp; | ||
comp = undefined; | ||
} | ||
// TODO: Is the `comp` arg still used? If not, remove it | ||
return this._c.create(id, this._parent, comp, options); | ||
@@ -44,0 +51,0 @@ } |
{ | ||
"name": "electrolyte", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Elegant dependency injection for Node.js.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
49769
803