mirror of
https://github.com/outbackdingo/control-pane.git
synced 2026-02-07 01:30:20 +00:00
25 lines
476 B
JavaScript
25 lines
476 B
JavaScript
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;
|