code: function filterFilesFromManifest(manifest, selector, logName) {
      // By removing files from the index, when the manifest is sorted and
      // validated, unreachable modules are removed.
      var removedFiles = [];
      manifest.indexes = Object.keys(manifest.indexes)
      .reduce(function(indexes, file) {
          if (selector(file)) {
              indexes[file] = manifest.indexes[file];
          } else {
              removedFiles.push(file);
              debug(file + ' removed from ' + logName);
          }
          return indexes;
      }, {});
  
      // Also, we need to make sure deps are updated to "false", which marks
      // the dep as external
      Object.keys(manifest.indexes).forEach(function(file) {
          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 (removedFiles.indexOf(value) >=0) {
                      module.deps[key] = false;
                  }
              });
          });
      });
  }
docs: /*
  receives a manifest and a "selector" function
  modifies manifest indexes to include only files that selector returns truthy