braintree/braintree.js — pull request #16 by christianreed (2014-02-04 23:08:30+00:00)
Title: Fix AMD implementation

I'm not really an expert in this but I think by defining a function name it limits how the module can be taken advantage of. Unfortunately, I believe that fixing this is probably going to screw people up that are relying on it. http://requirejs.org/docs/api.html#modulename

Additionally, if someone is using AMD, they probably don't want the global variable defined, so there should probably be an else statement where the object is placed in the global namespace. Here's a bunch of patterns for defining. https://github.com/umdjs/umd

Again, I'm not expert, I just started getting a bunch of errors and found the root was actually in this script, not ours.