code: function removeOrphans(manifest, logName) {
      var originalIndexes = Object.keys(manifest.indexes);
  
      // hashtable for number of time a bundle was visited
      var visitedIndexes = originalIndexes.reduce(function(indexes, file) {
          indexes[file] = false;
          return indexes;
      }, {});
  
      // recursive function to visit bundle and it's deps
      function visitBundle(file) {
          if (visitedIndexes[file]) {
              return;
          }
          visitedIndexes[file] = true;
          // walk deps
          var bundle = manifest.bundles[manifest.indexes[file]];
          bundle.data.forEach(function(module) {
              Object.keys(module.deps).forEach(function(key) {
                  var value = module.deps[key];
                  if (visitedIndexes.hasOwnProperty(value)) {
                      visitBundle(value);
                  }
              });
          });
      }
  
      // start visiting from entries and exposed
      originalIndexes.forEach(function(file) {
          var bundle = manifest.bundles[manifest.indexes[file]];
          if (bundle.expose || bundle.entry) {
              visitBundle(file);
          }
      });
  
      filterFilesFromManifest(manifest, function(file) {
          return visitedIndexes.hasOwnProperty(file) && visitedIndexes[file];
      }, logName);
  }
docs: /*
  walks the manifest dependencies and remove indexes that are unreachable