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
var defs = {}; | |
var modules = {}; | |
function define(name, fn) { | |
defs[name] = fn; | |
} | |
function require(name) { | |
//console.log("Loading " + name); | |
if (modules.hasOwnProperty(name)) return modules[name]; | |
if (defs.hasOwnProperty(name)) { | |
var fn = defs[name]; |