jiuyiUniapp/service/node_modules/caller-path
sx 61537cc3bd 九亿商家端静态页 2025-02-13 09:59:20 +08:00
..
index.js 九亿商家端静态页 2025-02-13 09:59:20 +08:00
license 九亿商家端静态页 2025-02-13 09:59:20 +08:00
package.json 九亿商家端静态页 2025-02-13 09:59:20 +08:00
readme.md 九亿商家端静态页 2025-02-13 09:59:20 +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