Mercurial > pub > ImplabJs
diff src/implab/di/Container.js @ 1:93fb6c09f2e1
minor fixes
author | cin |
---|---|
date | Fri, 02 Jun 2017 18:15:22 +0300 |
parents | fc2517695ee1 |
children | 00779cb63b12 |
line wrap: on
line diff
--- a/src/implab/di/Container.js Thu Jun 01 13:20:03 2017 +0300 +++ b/src/implab/di/Container.js Fri Jun 02 18:15:22 2017 +0300 @@ -1,8 +1,8 @@ define([ "../declare", "../safe", - "../UUID", - "dojo/Deferred", + "../Uuid", + "../Deferred", "./ActivationContext", "./Descriptor", "./ValueDescriptor", @@ -11,9 +11,8 @@ "./ActivationError" ], function ( declare, - array, safe, - UUID, + Uuid, Deferred, ActivationContext, Descriptor, @@ -45,6 +44,9 @@ return this._parent; }, + /** + * + */ getService: function (name, def) { var d = this._services[name]; if (!d) @@ -108,7 +110,7 @@ if (typeof (config) === "string") { p = new Deferred(); if (!contextRequire) { - var shim = config + "-" + UUID(); + var shim = config + "-" + Uuid(); define(shim, ["require", config], function (ctx, data) { p.resolve([data, { contextRequire: ctx @@ -228,11 +230,9 @@ if (data.services) opts.services = me._parseObject(data.services, typemap); if (data.inject) - opts.inject = data.inject instanceof Array ? array.map( - data.inject, - function (x) { - return me._parseObject(x, typemap); - }) : me._parseObject(data.inject, typemap); + opts.inject = data.inject instanceof Array ? data.inject.map(function (x) { + return me._parseObject(x, typemap); + }) : me._parseObject(data.inject, typemap); if (data.params) opts.params = me._parse(data.params, typemap); @@ -288,7 +288,7 @@ return new Value(data, true); var me = this; - return array.map(data, function (x) { + return data.map(function (x) { return me._parse(x, typemap); }); }