tree: a57b8de579b06ada9d94321c4e22297369e7132f [path history] [tgz]
  1. index.js
  2. license
  3. package.json
  4. readme.md
setup-maven/node_modules/caller-path/readme.md

caller-path Build Status

Get the path of the caller function

Install

$ npm install --save caller-path

Usage

// foo.js
const callerPath = require('caller-path');

module.exports = () => {
	console.log(callerPath());
	//=> '/Users/sindresorhus/dev/unicorn/bar.js'
}
// bar.js
const foo = require('./foo');
foo();

License

MIT © Sindre Sorhus