lib/define.js
function require(parent, id, fn) {
		if (fn) { return ensure(parent, id, fn); }
		var module = getModule(parent, id);
		if (!module.loaded) { throw new Error(id + ' not found'); }
		if (!('exports' in module)) {
			module.parent = parent; // first module to actually require this one is parent

			// if define was passed a non-function, just assign it to exports
			if ('function' !== typeof factories[id = module.id]) { module.exports = factories[id]; }
			else {
				module.exports = {};
				fn = map(module.children.slice(0, factories[id].length), // don't require prematurely on wrapped commonjs
						function(child) { return require(module, child.id); });
				if ((fn = factories[id].apply(global, fn))) { module.exports = fn; } // if something was returned, export it instead
			}
		}
		return module.exports;
	}
function require(parent, id, fn) {
		if (fn) { return ensure(parent, id, fn); }
		var module = getModule(parent, id);
		if (!module.loaded) { throw new Error(id + ' not found'); }
		if (!('exports' in module)) {
			module.parent = parent; // first module to actually require this one is parent

			// if define was passed a non-function, just assign it to exports
			if ('function' !== typeof factories[id = module.id]) { module.exports = factories[id]; }
			else {
				module.exports = {};
				fn = map(module.children.slice(0, factories[id].length), // don't require prematurely on wrapped commonjs
						function(child) { return require(module, child.id); });
				if ((fn = factories[id].apply(global, fn))) { module.exports = fn; } // if something was returned, export it instead
			}
		}
		return module.exports;
	}
function require ( parent , id , fn ) { if ( fn ) { return ensure ( parent , id , fn ) ; } var module = getModule ( parent , id ) ; if ( ! module . loaded ) { throw new Error ( id + ' not found' ) ; } if ( ! ( 'exports' in module ) ) { module . parent = parent ; // first module to actually require this one is parent // if define was passed a non-function, just assign it to exports if ( 'function' !== typeof factories [ id = module . id ] ) { module . exports = factories [ id ] ; } else { module . exports = { } ; fn = map ( module . children . slice ( 0 , factories [ id ] . length ) , // don't require prematurely on wrapped commonjs function ( child ) { return require ( module , child . id ) ; } ) ; if ( ( fn = factories [ id ] . apply ( global , fn ) ) ) { module . exports = fn ; } // if something was returned, export it instead } } return module . exports ; }
execute a module's code, and return its exports
execute a module s code and return its exports