Last change
on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
321 bytes
|
Line | |
---|
1 | export default function whichModule(exported) {
|
---|
2 | if (typeof require === 'undefined')
|
---|
3 | return null;
|
---|
4 | for (let i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) {
|
---|
5 | mod = require.cache[files[i]];
|
---|
6 | if (mod.exports === exported)
|
---|
7 | return mod;
|
---|
8 | }
|
---|
9 | return null;
|
---|
10 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.