car_web/node_modules/caller-path
xzk a886a0fe6a 许兆坤 2024-03-15 14:22:17 +08:00
..
license 许兆坤 2024-03-15 14:22:17 +08:00
readme.md 许兆坤 2024-03-15 14:22:17 +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