millermedeiros/js-signals — pull request #46 by conradz (2012-07-31 16:01:38+00:00)
Title: Fix AMD define call to use a wrapper function

The fix for issue #44 created a new problem with the AMD define call. The define call expects either an object to define or a function the will *return* the object to define. The fix for #44 exports a function, so the AMD loader (at least in RequireJS) will invoke the `Signal` constructor that is passed to the `define` call. Of course the constructor doesn't return anything, so the export for `signals` is `undefined`.

This pull request fixes this issue.

If you want to do a build yourself, the only line that really changed is [this line](https://github.com/conradz/js-signals/commit/39147a1cf9f7e011def20760d233f14068fee101#L1R13)