SafetyScreen-ui/node_modules/caller-path
haozq 723f80cdec first commit 2025-03-29 19:33:58 +08:00
..
index.js first commit 2025-03-29 19:33:58 +08:00
license first commit 2025-03-29 19:33:58 +08:00
package.json first commit 2025-03-29 19:33:58 +08:00
readme.md first commit 2025-03-29 19:33:58 +08: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