Package Exports
- discover-source-path
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (discover-source-path) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
discover-source-path
Use tricks to find the source file path of the current function being executed
Install
$ npm install discover-source-pathUse
var discoverRelativePath = require('discover-source-path');
var myFilePath = discoverRelativePath();stackDrop
If you need to trace back a different number of levels than the default, you can pass the number of lines to drop as a parameter (default is 2 lines dropped from the stack)
discoverRelativePath(3);