liangjiahao 8f813121f8 添加查看按钮的窗口 há 3 anos atrás
..
index.js fcedc92fa0 完成了基础 há 3 anos atrás
license fcedc92fa0 完成了基础 há 3 anos atrás
package.json 8f813121f8 添加查看按钮的窗口 há 3 anos atrás
readme.md fcedc92fa0 完成了基础 há 3 anos atrás

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