Remove extra method from di

This commit is contained in:
Mohammad Fares 2018-10-01 12:25:56 +03:00
parent 8b60852be1
commit ecbaf11ea0
1 changed files with 0 additions and 26 deletions

26
di.js
View File

@ -4,31 +4,6 @@
* @author Mohammad Fares <faressoft.com@gmail.com> * @author Mohammad Fares <faressoft.com@gmail.com>
*/ */
var is = require('is_js');
/**
* Dependencies
* @type {Object}
*/
var dependency = {};
/**
* Get a specific dependency
*
* @param {String} key
* @return {Object|Null} return null if not found
*/
module.exports.get = function(key) {
// Not found
if (is.not.propertyDefined(dependency, key)) {
return null;
}
return dependency[key];
};
/** /**
* Set/Add a dependency * Set/Add a dependency
* *
@ -37,7 +12,6 @@ module.exports.get = function(key) {
*/ */
module.exports.set = function(key, value) { module.exports.set = function(key, value) {
dependency[key] = value;
module.exports[key] = value; module.exports[key] = value;
}; };