diff options
Diffstat (limited to 'node_modules/which-module/index.js')
-rw-r--r-- | node_modules/which-module/index.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/node_modules/which-module/index.js b/node_modules/which-module/index.js new file mode 100644 index 000000000..45559b781 --- /dev/null +++ b/node_modules/which-module/index.js @@ -0,0 +1,9 @@ +'use strict' + +module.exports = function whichModule (exported) { + for (var i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) { + mod = require.cache[files[i]] + if (mod.exports === exported) return mod + } + return null +} |