Created
September 29, 2014 18:54
-
-
Save WesSouza/98f61f7d33cd3818b32e to your computer and use it in GitHub Desktop.
Require/define, min.
This file contains 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
;(function(where){ | |
var defined={},required={}; | |
function define(thing,something){ | |
defined[thing]=something | |
} | |
function require(thing){ | |
required[thing]=required[thing]||defined[thing]() | |
return required[thing] | |
} | |
where.define=define | |
where.require=require; | |
})(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment