linkedin/dustjs — pull request #191 by jimmyhchan (2012-11-11 06:49:24+00:00)
Title: AMD friendly module pattern

Making `dust` AMD friendly.
Using the UMD pattern https://github.com/umdjs/umd/blob/master/returnExports.js

Top part handles all the different cases for AMD/CommonJS and falls back to the window global

Biggest changes:
* remove the `getGlobal` method in favor of the passing the global this into the closure
* remove the export check and use the UMD pattern check (but I've kept the node server check in the module)
* set the `dust.helpers` object here (line 26)