index.js
function dive(name) {
		// check if this module has already been 
		// processed in case of circular dependency
		if (dive[name]) {
			return;
		}
		dive[name] = true;
		dive.required.push(name);

		var deps = allModules[name] || [];
		deps.forEach(function (item) {
			dive(item);
		});
	}
function dive(name) {
		// check if this module has already been 
		// processed in case of circular dependency
		if (dive[name]) {
			return;
		}
		dive[name] = true;
		dive.required.push(name);

		var deps = allModules[name] || [];
		deps.forEach(function (item) {
			dive(item);
		});
	}
function dive ( name ) { // check if this module has already been  // processed in case of circular dependency if ( dive [ name ] ) { return ; } dive [ name ] = true ; dive . required . push ( name ) ; var deps = allModules [ name ] || [ ] ; deps . forEach ( function ( item ) { dive ( item ) ; } ) ; }
recursive function, dive into the dependencies
recursive function dive into the dependencies