A small service locator library
bower install radar
var requirejs = {
"paths": {
"Radar" : "bower_components/radar/src"
}
};
You can use Radars global service locator
var ServiceLocator = require('Radar/Radar');
ServiceLocator.set('key', 'value');
ServiceLocator.get('key') // value
Or you can instantiate your own
var Locator = require('Radar/Locator');
var ServiceLocator = new Locator();