react-native/packager/src/node-haste/lib/getInverseDependencies.js
function getInverseDependencies(resolutionResponse) {
  const cache = new Map();

  resolutionResponse.dependencies.forEach(module => {
    resolveModuleRequires(resolutionResponse, module).forEach(dependency => {
      getModuleDependents(cache, dependency).add(module);
    });
  });

  return cache;
}
function getInverseDependencies(resolutionResponse) {
  const cache = new Map();

  resolutionResponse.dependencies.forEach(module => {
    resolveModuleRequires(resolutionResponse, module).forEach(dependency => {
      getModuleDependents(cache, dependency).add(module);
    });
  });

  return cache;
}
function getInverseDependencies ( resolutionResponse ) { const cache = new Map ( ) ; resolutionResponse . dependencies . forEach ( module => { resolveModuleRequires ( resolutionResponse , module ) . forEach ( dependency => { getModuleDependents ( cache , dependency ) . add ( module ) ; } ) ; } ) ; return cache ; }
Returns an object that indicates in which module each module is required.
Returns an object that indicates in which module each module is required .