docs: function indexedDeps(mods) {
      // the index can't be ever 0 because 0 is false for browserify
      var newModIndex = [0];
  
      // indexes are created first, because deps can come unordered
      mods.forEach(function(mod){
          if (!mod.expose) newModIndex.push(mod.id);
      });
  
      // create a new array of modified modules
      return mods.map(function(oldMod) {
          return Object.keys(oldMod).reduce(function(newMod, prop) {
  
              if (prop === 'deps') { // deps needs to be reindexed
                  newMod.deps = Object.keys(oldMod.deps).reduce(
                      function(newDeps, name) {
                          var id = oldMod.deps[name];
                          var index = newModIndex.indexOf(id);
                          if (index > -1) {
                              newDeps[name] = index;
                          } else {
                              // deps not indexed are exposed or external
                              newDeps[name] = id;
                          }
                          return newDeps;
                      },
                  {});
              }
  
  
              else if(prop === 'id') { // id needs to be reindexed
                  var index = newModIndex.indexOf(oldMod.id);
                  if (index > -1) {
                      newMod.id = index;
                  } else {
                      // unless it is entry or exposed
                      newMod.id = oldMod.expose || oldMod.id;
                  }
              }
  
              else {
                  // for all other props we just copy over
                  newMod[prop] = oldMod[prop];
              }
  
              return newMod;
          }, {});
      });
  }