I wonder how-to get an absolute path of a caller of a function?
Let say that:
in file a.js I call b(); b() is a functi
a.js
b()
Use https://github.com/sindresorhus/callsites
If you use the first answer you could mess up with other libraries trying to do the same thing. See for example: https://github.com/facebook/jest/issues/5303