The usual recommended pattern is: `typeof define === "function" && define.amd`. These module adapters are used for files that can be used in multiple environments, including a "browser globals" case that does not have a module API available, but still may have a global define function. The define.amd check ensures the define is only called in the AMD case.

That check also helps the optimizer to know what kind of define checks/calls to rewrite. There are libraries that internal define functions that are not AMD define calls, and so not just any define reference can be rewritten for the namespacing feature that @terinjokes is using.