docs: function processLinked(deps, processed) {
        if(_.isEmpty(deps)) {
          return;
        }
        if(!processed) {
          processed = _.clone(deps);
        }
  
        var newDeps = {};
        var promise = when.resolve();
        _.each(deps, function(version, link) {
          promise = promise.then(function() {
            var pkgPath = path.resolve(nodeModulesDir, link, 'package.json');
            if (!fs.existsSync(pkgPath)) { throw new Error('Invalid package at '+pkgPath); }
            var linkPackage = require(pkgPath);
  
            if(!_.isEmpty(linkPackage.peerDependencies)) {
              //Install OR link peer dependencies
              self.log.verbose("Installing peer dependencies " +
                JSON.stringify(_.keys(linkPackage.peerDependencies)) + " from "
                + linkPackage.name + "@" + linkPackage.version + " into " + cwd);
            }
  
            return self.installWorkspaceDependencies(cwd, linkPackage.peerDependencies, workspaceDescriptor, installed)
            .then(function(newResults) {
              _.extend(newDeps, newResults.linked);
            });
          });
        });
  
        return promise.then(function() {
          var diff = _.omit(newDeps, _.keys(processed));
          //update the global list
          var newProcessed = _.extend({}, processed, diff);
          //process only new links
          return processLinked(diff, newProcessed);
        });
      }