mirror of
https://github.com/nasa/openmct.git
synced 2024-12-18 20:57:53 +00:00
[API] Decruft unused script
This commit is contained in:
parent
b5f1f98555
commit
3bd8dd9928
@ -1,21 +0,0 @@
|
||||
define([], function () {
|
||||
function Registry() {
|
||||
this.providers = [];
|
||||
}
|
||||
|
||||
Registry.prototype.get = function (context) {
|
||||
return this.providers.filter(function (provider) {
|
||||
return provider.appliesTo(context);
|
||||
}).map(function (provider) {
|
||||
return provider.get(context);
|
||||
}).reduce(function (a, b) {
|
||||
return Array.isArray(b) ? a.concat(b) : a.concat([b]);
|
||||
}, []);
|
||||
};
|
||||
|
||||
Registry.prototype.register = function (provider) {
|
||||
this.providers.push(provider);
|
||||
};
|
||||
|
||||
return Registry;
|
||||
});
|
Loading…
Reference in New Issue
Block a user