function resolve(declarations, name, cache, resolved, stack) {
        var decl = declarations[name];
        if (!resolved[name]) {
            if (stack[name]) {
                error("Recursive dependency '" + name + "'");
            }
            stack[name] = true;
            for (var i = 0, len = decl._dependencies.length; i < len; i++) {
                var reqName = decl._dependencies[i];
                forEach(declarations, reqName, function(depName) {
                    if (depName !== name) {
                        delete cache.root[depName];
                        cache.dependencies[name].push(depName);
                        resolve(declarations, depName, cache, resolved, stack);
                    }
                });
            }
            resolved[name] = true;
        }
    }
function resolve(declarations, name, cache, resolved, stack) {
        var decl = declarations[name];
        if (!resolved[name]) {
            if (stack[name]) {
                error("Recursive dependency '" + name + "'");
            }
            stack[name] = true;
            for (var i = 0, len = decl._dependencies.length; i < len; i++) {
                var reqName = decl._dependencies[i];
                forEach(declarations, reqName, function(depName) {
                    if (depName !== name) {
                        delete cache.root[depName];
                        cache.dependencies[name].push(depName);
                        resolve(declarations, depName, cache, resolved, stack);
                    }
                });
            }
            resolved[name] = true;
        }
    }
function resolve ( declarations , name , cache , resolved , stack ) { var decl = declarations [ name ] ; if ( ! resolved [ name ] ) { if ( stack [ name ] ) { error ( "Recursive dependency '" + name + "'" ) ; } stack [ name ] = true ; for ( var i = 0 , len = decl . _dependencies . length ; i < len ; i ++ ) { var reqName = decl . _dependencies [ i ] ; forEach ( declarations , reqName , function ( depName ) { if ( depName !== name ) { delete cache . root [ depName ] ; cache . dependencies [ name ] . push ( depName ) ; resolve ( declarations , depName , cache , resolved , stack ) ; } } ) ; } resolved [ name ] = true ; } }
Check and prepare (uncap `*` mask) unit dependencies.
Check and prepare ( uncap * mask ) unit dependencies .