readmill/m.js — pull request #8 by aron (2013-12-03 09:57:56+00:00)
Title: Move all module.* methods into a separate constructor function

This makes the code more portable and easier to test. Key changes are:

* Creation of the `ModuleRegistry` constructor, this handles dom events and creation and registration of modules.
* Moving broadcast and inheritance methods onto a `utils` object.
* `m.module()` still exists but is now just a wrapper around `ModuleRegistry`.