diff options
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/di/lib/module.js')
-rw-r--r-- | vnfmarket/src/main/webapp/vnfmarket/node_modules/di/lib/module.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/di/lib/module.js b/vnfmarket/src/main/webapp/vnfmarket/node_modules/di/lib/module.js new file mode 100644 index 00000000..4fd218e9 --- /dev/null +++ b/vnfmarket/src/main/webapp/vnfmarket/node_modules/di/lib/module.js @@ -0,0 +1,24 @@ +var Module = function() { + var providers = []; + + this.factory = function(name, factory) { + providers.push([name, 'factory', factory]); + return this; + }; + + this.value = function(name, value) { + providers.push([name, 'value', value]); + return this; + }; + + this.type = function(name, type) { + providers.push([name, 'type', type]); + return this; + }; + + this.forEach = function(iterator) { + providers.forEach(iterator); + }; +}; + +module.exports = Module; |