setup-maven/node_modules/caller-path
2022-10-10 11:17:09 +02:00
..
index.js change url to archive mirror 2020-02-03 13:46:22 +03:00
license change url to archive mirror 2020-02-03 13:46:22 +03:00
package.json Update dependencies 2022-10-10 11:17:09 +02:00
readme.md change url to archive mirror 2020-02-03 13:46:22 +03:00

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