index.js 248 B

123456789
  1. 'use strict'
  2. module.exports = function whichModule (exported) {
  3. for (var i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) {
  4. mod = require.cache[files[i]]
  5. if (mod.exports === exported) return mod
  6. }
  7. return null
  8. }