outaozhen bb52c63d7d 库提交 vor 5 Jahren
..
index.js 9778140fc2 测试提交 vor 5 Jahren
license 9778140fc2 测试提交 vor 5 Jahren
package.json bb52c63d7d 库提交 vor 5 Jahren
readme.md 9778140fc2 测试提交 vor 5 Jahren

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