hellatan/javascript — pull request #2 by twhid (2014-04-01 16:34:04+00:00)
Title: UMD update

We need to impart a more standard way to write UMD modules. Using a magic global dibs object to put the module in the global scope isn't future-proof, plus it's not how we want to write UMD modules going forward (it's a stop-gap). There may be times in the future when we're completely in a module system where we want to use UMD (open source stuff for example), writing a module using the current example wouldn't fly.

Plus, tools wouldn't be able to follow this pattern.

Also, the _exports object is completely redudant in the current example.

Additionally, we should start moving UMD modules away from attaching thing to global namespace and they should just take their own global name.