Created
October 10, 2013 06:41
-
-
Save jakelazaroff/6914043 to your computer and use it in GitHub Desktop.
Adapt non-AMD compliant code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// make sure AMD is available | |
if (typeof define !== "undefined") | |
// define a module for the library | |
define([], function(){ | |
// create a local copy | |
var EvilNonAmdSupportingLibrary = window.EvilNonAmdSupportingLibrary; | |
// remove the copy in the global namespace | |
window.EvilNonAmdSupportingLibrary = undefined; | |
// return the local copy to AMD library | |
return EvilNonAmdSupportingLibrary; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment