Files
setup-haskell/node_modules/caller-path
Timothy Clem 63b90beb0c npm audit fix
2019-09-30 10:04:01 -07:00
..
2019-09-30 10:04:01 -07:00
2019-09-30 10:04:01 -07:00
2019-09-30 10:04:01 -07:00
2019-09-30 10:04:01 -07: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