ModuleManager class solves modules dependencies


Set's .currentModule to provided module.


Set's .currentModule to null.

add(key, object, config[optional])

Adds dependency to .store collection.

manager.add('hello', {world: true});

config object

aliasIf string is provided - will add a referense to dependency from manager's handler. handler.[aliasValue]
immutableSet to false by default. Defines whether dependency can be overwrited by other modules.



Returns dependency by it's key in store object

manager.get('hello'); // -> {world: true}



Returns a Boolean value. Whether manager has a dependency with the following key

.set(key, value)


An alias for .add()

Use this method if you know that you will overwrite existing dependency. Use it in your app, but not in module that you provide to other people.