1
0
mirror of https://github.com/actions/setup-node synced 2025-05-13 19:37:49 +00:00
setup-node/node_modules/caller-path
eric sciple 422b9fdb15 .
2020-01-24 12:21:24 -05:00
..
index.js . 2020-01-24 12:21:24 -05:00
license . 2020-01-24 12:21:24 -05:00
package.json . 2020-01-24 12:21:24 -05:00
readme.md . 2020-01-24 12:21:24 -05: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