GT2/Ejectable/node_modules/caller-path
Ren Juan 06c1a5835d set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
..
index.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
license set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
package.json set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
readme.md set clean start from expo 4.10 2021-08-16 00:14:59 +00:00

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