Files
setup-ruby/node_modules/caller-path
Stephen Franceschelli e3283467a1 Fix bug. Add workflows.
2019-07-15 13:23:24 -04:00
..
2019-07-15 13:23:24 -04:00
2019-07-15 13:23:24 -04:00
2019-07-15 13:23:24 -04:00
2019-07-15 13:23:24 -04: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